21309 Posts in 5738 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 277 Views |
-
hard coding a javascript and text in an error page

11 January 2012 at 4:47pm Last edited: 11 January 2012 4:54pm
hey i have getting alot of good help from everyone here so i thought i would come here first
i have a errorpage.ss file and what i want to do is this.
below the content inserted using the backend i want to add a javascript:history.go(-1) in there but when i hard code it it does not look the same as the rest, any ideas how to do this(link is http://w1.advancetechuk.com/3/notfound) this goes direct to the page not found page
-
Re: hard coding a javascript and text in an error page

12 January 2012 at 11:43am
If you are hardcoding in the template file (.ss) it will be output just as you type it.
If you add javascript into the Content area (WYSIWYG editor) it will be broken i guess.
If you want the JS to be added just below the rest of the text, you must hardcode it inside the <div id="Content" class="typography"> tag.Other than that please try to explain what you mean with, it does not look the same as the rest.
-
Re: hard coding a javascript and text in an error page

12 January 2012 at 12:09pm Last edited: 12 January 2012 12:14pm
well if you actually look at the error page link above you would notice what it does,
I will be adding JS for a 3rd level menu but at present i just want the text to look the same and be below the $content part, however it displays in a <p> tag and then moves to the right of the $Content as if it was in a tableas for the insert code bit do you mean like this
...
<div id="Header">
<h1>$Title</h1>
</div>
<div id="ContentContainer">
<div id="Banner">
</div>
<div id="Content" class="typography">
$Layout
<p>Please click <a href="javascript:history.go(-1)">here to go back</a> and try again</p>
</div>
</div>
<div id="Footer">
<span>©2012 Advancetech. All rights reserved. Design by Advancetech IT Services</span>
</div>
...
? mind this is not a layout page its a main template -
Re: hard coding a javascript and text in an error page

12 January 2012 at 12:21pm
Sorted!
I went through the code again and realised 2 things
1. there was no <div id="Content">
2nd i had $layout in
modified that and all is working goooddd
your info helped alot
| 277 Views | ||
|
Page:
1
|
Go to Top |

