Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WRITE IN HEAD PAGE JAVSCRIPT FUNCTION

Status
Not open for further replies.

PATRICETEXIER

Programmer
Feb 15, 2001
3
0
0
FR
Hello,

I want write more functions in the head page from the programming editor.
(without use the Javascript button, in the page properties)
I can write before & after the HTML TAG, but not in the head tag. The function writeScript can write the javascript code but not javascript function because the OnBodyLoad '{' it's not close and when the page is loadin, an error javascript appears. It's possible to close '{' before write the fisrt javascript function. But when i use AgiJavaScriptHelper (alert for example) is write in onBodyLoad but you have close the '}' -> a javascript error etc...

Excuse me for my bad english. Thanks. patrice
 
If I follow you correctly you want to add some JavaScript functions and make them initiate on load. I'll answer that question and apologize if that is not what you asked.

I found that putting the javascripts inside the Advanced -- Header Tags button on the page properties in stead of on the Scripting -- JavaScript... works better. Here you can include external .js files as well as inline scripts. Next if you want the method to initiate on load you can't just say <BODY OnLoad = &quot;method_init();&quot;>. SilverStream already has an OnLoad event that seems to override anything you do like this. What I found is that if you then put in the pageGenerateBegin method the line writeScript(&quot;method_int();&quot;) everything is ok.

Hope that helps...
tone
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top