BobDoleX
08-04-2003, 11:45 PM
I have 2 quetsions concerning javascript.
For the first one, i have a button...
<input type="button" name="boldButton" value="Bold" Onclick="insertTag('whatever')">
in whatever, iwant to include something that would involve double quotes ( " ) like Onclick="insertTag('Hi "y" a')". in PHP, i guess u would do the \" thing, but what would u do in this case?
For the second one, i got this script...
<script>
function preview() {
document.forms[0].action = "something.php";
document.forms[0].submit();
}
function writefile() {
document.forms[0].action = "writefile.php";
document.forms[0].submit();
}
</script>
<input type="button" onClick="writefile()" value=" Submit ">
<input type="button" onClick="preview()" value=" Preview ">
I want, when i click the preview button for something.php to pop-up. How would i do this?
As you can see, i'm not very familier with javascript and only recently got into it, but help would be much appresiated
:thumbsup:
For the first one, i have a button...
<input type="button" name="boldButton" value="Bold" Onclick="insertTag('whatever')">
in whatever, iwant to include something that would involve double quotes ( " ) like Onclick="insertTag('Hi "y" a')". in PHP, i guess u would do the \" thing, but what would u do in this case?
For the second one, i got this script...
<script>
function preview() {
document.forms[0].action = "something.php";
document.forms[0].submit();
}
function writefile() {
document.forms[0].action = "writefile.php";
document.forms[0].submit();
}
</script>
<input type="button" onClick="writefile()" value=" Submit ">
<input type="button" onClick="preview()" value=" Preview ">
I want, when i click the preview button for something.php to pop-up. How would i do this?
As you can see, i'm not very familier with javascript and only recently got into it, but help would be much appresiated
:thumbsup: