PDA

View Full Version : Cant print Javascript code



quantumpixel
09-04-2002, 06:09 PM
i need help im a beginner...

im trying to validate some text fields before been sent to the script using javascript "onsubmit"... but the page is printed by a script and i cant get it to work... the java code is long and y tried to

print 'everyline';

and didnt work...

please help ! :confused:

chrisvmarle
09-05-2002, 06:07 AM
Then,

print qq~The whole tekst,
not line by line, but
just continueing on the next and even using
characters like " and '
So like this:
<script Language="JavaScript">
function start() {
alert("The javascript is starting")
alert("And I even can use \"-characters :)")
}
start()
</script>
~;

Is that clear?

Mzzl, Chris

quantumpixel
09-05-2002, 07:18 AM
sorry but i still have an error...

let me see if i got u right...

its the same as

print <<HTML1;

code

HTML1

so i should just type

print qq~

code

~;

________________________________

thanks for ur help... really appreciate it... :thumbsup:

chrisvmarle
09-05-2002, 11:38 AM
Yep, that should work

Maybe you can post more info (your .cgi file, or a part of it)

Mzzl, Chris

quantumpixel
09-05-2002, 09:21 PM
---