PDA

View Full Version : Ajax Help...



Recursion
16-04-2007, 10:13 AM
Hello,

Right of got the Navigation sorted but how do I make some content appear when you first load the page? Because if i just put some in the DIV you wont be able to go back to it...

Please Help!

Tom

redtom
16-04-2007, 11:25 AM
Type up your welcome page content in the div, then copy and paste the content on to a page called home.html then in the navigation have a link to home, just remember when you update the welcome text copy and paste it into the home.html file.

Recursion
16-04-2007, 01:46 PM
Thats just messy though :(

redtom
16-04-2007, 01:52 PM
Thats just messy though :(

How is it messy? Dont you mean your lazy.

Recursion
16-04-2007, 01:54 PM
Its messy because you then have two instances of the file, when you could possible have just 1 or even none...

Also, yes I am very lazy :]

redtom
16-04-2007, 01:56 PM
Its messy because you then have two instances of the file, when you could possible have just 1 or even none...

Also, yes I am very lazy :]

Lol its just copy and pasting.

Recursion
16-04-2007, 01:56 PM
Mhmmm fine :(

Tomm
16-04-2007, 03:27 PM
Use the onLoad tag in <body>..

e.g

<body onLoad="mypagefunctionajaxthing('homepage.html')">

Recursion
16-04-2007, 03:33 PM
If the script in m head tag is:



<script type="text/javascript">
function setBackgroundImage(url) {
document.body.style.backgroundImage = 'url(' + url + ')';
}
</script>

and the code for the link is:

<a href="javascript:void(0)" onclick="open_url('pages/testing/test.html','rboxs');">Go to page 1</a>


What would I change 'mypagefunctionajaxthing' to?

Tomm
16-04-2007, 03:36 PM
<body onLoad="open_url('pages/testing/test.html','rboxs');">

Recursion
16-04-2007, 03:37 PM
ahh i see now :)

+REP :)

Want to hide these adverts? Register an account for free!