Link to home
Start Free TrialLog in
Avatar of dereksheahan
dereksheahan

asked on

Modifying Template so that body (onload) function can be changed as required

Hi all,
I have child pages where many of them require a different body onload tag (i.e. <body onLoad="document.theformonthepage.submit();"> ). I want to make this region editable on the child pages so I can alter this as required. When I try to select the text in the code and click add editable region it doesn't work. I've also tried going to Template > Modify > Make Attribute Editable but it goes I can't seem to edit it correctly on the child page. It gives me this on the child page:
<!-- InstanceParam name="onload" type="text" value="start()" -->
</head>

I think the above is concerned with the <head> as its enclosed in the tag and when I change the onload to the document.theformonthepage.submit();" it doesn't work. e.g (<!-- InstanceParam name="onload" type="text" value="document.form1.submit();" -->)
Anyone have any ideas?
Thanks,
D
Avatar of dereksheahan
dereksheahan

ASKER

I've also tried creating a second template with the body onload tag included but run into the same problem as I can't edit the name of the form in it (i.e. onLoad="document.theformonthepage.submit();"> )
ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Great Jason, that fixed it alright!
Thanks,
D