PLA Forums
Other Stuff That Has Little To Do With PLA => Techinical Shit => Technical Support => Topic started by: BrianOlsen on December 23, 2006, 12:11:33 PM
-
I am using this JS to insert a value into a form text box, it works great but when someone clicks another link, it changes the form text box to the newly clicked value. I would like it to append to the existing value.
Eg; it inserts "one" and when i click on two, it changes "one" to "two", i would like it to show "one two"
<script language='javascript' type="text/javascript">
<!-- Hide script from older browsers
function cc(val) {
document.form1.cc.value = val
}
// End hiding script from older browsers -->
</script>
-
I am using this JS to insert a value into a form text box, it works great but when someone clicks another link, it changes the form text box to the newly clicked value. I would like it to append to the existing value.
Eg; it inserts "one" and when i click on two, it changes "one" to "two", i would like it to show "one two"
<script language='javascript' type="text/javascript">
<!-- Hide script from older browsers
function cc(val) {
document.form1.cc.value = val
}
// End hiding script from older browsers -->
</script>
Change this line:
document.form1.cc.value = val
To this:
document.form1.cc.value += val
-
That worked. Thanks!!!!!
-
Can you include JS, html, and php into one file? I want my site to have a login that keeps the user logged in the entire time. Where would I start?
I use the forum used here but I just converted the database from invision to smf.
-
Can you include JS, html, and php into one file? I want my site to have a login that keeps the user logged in the entire time. Where would I start?
I use the forum used here but I just converted the database from invision to smf.
1. Yes.
2. You'll need to use SSI......and what's nice is that the commands are already in place. For example:
ssi_welcome();
ssi_login();
This will automatically create the login and welcome portion. You just need to place it in your php file (index.php or whatever)
-
Ok this is what I did.
<?php
include './forum/SSI.php';
ssi_welcome();
ssi_login();
?>
But I want the login to be nice looking with a blue border, red lettering, and whatnot. How do i do this?
-
Ok this is what I did.
<?php
include './forum/SSI.php';
ssi_welcome();
ssi_login();
?>
But I want the login to be nice looking with a blue border, red lettering, and whatnot. How do i do this?
Use CSS. Then reference the style sheet in the <head> portion within your php code.
-
I'll be honest, I don't know how to do that. Will you show me?
-
I'll be honest, I don't know how to do that. Will you show me?
Okay, do this:
PHP code and name the file whatever suits you ending with *.php.
<?php
include './forum/SSI.php';
echo '<head><link rel="stylesheet" type="text/css" href="login.css" /></head><body>
<fieldset>
<legend>Go directly to the <a href="/forum">forum</a>.</legend>';
ssi_welcome();
ssi_login();
echo '</fieldset> </body>';
?>
And here's the CSS code that should be named "login.css" in order for your PHP file to pick it up.
input[type="submit"]{
margin-left: 5em;
clear: both;
color: #000;
background: #fb0;
border: 2px #9cf outset
}
fieldset
{
border: #26a solid 1px;
width: 20em
}
legend
{
background: #fb0;
border: #26a solid 1px;
padding: 1px 10px
}
label
{
width: 4em !important;
float: left !important;
text-align: right !important;
margin: 0 1em 10px 0 !important;
clear: both !important;
}
input[id="user"], input[id="passwrd"]
{
float: left;
margin-bottom: 10px;
color: #26a;
background: #feb;
border: #26a solid 1px
}
The way it's written - the CSS file needs to be in the same directory as the PHP file. I currently set the hyper reference towards whatever directory you place it in.
Hope this helps.
-
Dude! This is exactly want I wanted and it works beautifully, you're a ninja. Can I paypal you some cash for your time?
-
Dude! This is exactly want I wanted and it works beautifully, you're a ninja. Can I paypal you some cash for your time?
No. Go donate to your local battered women's shelter.
-
Ok I did that. I used paypal to donate $20.00 to an online organization.