Welcome to Dream.In.Code
Getting Help is Easy!

Join 86,383 Programmers. There are 1,380 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

Auto load on page load

 
Reply to this topicStart new topic

Auto load on page load

jibber4568
post 3 May, 2008 - 02:33 PM
Post #1


New D.I.C Head

*
Joined: 11 Feb, 2008
Posts: 31



Sorry my title doesn't represent my question to well.

On most pages on my site if i hit the artists button it will use ajax to load content from a txt file into a specific div tag.

When navigating from other pages is there a way i can navigate to the page and auto execute the javascript function.


For example:

on my home page, if i hit artists the javascript adds the content of artists.txt into the div named content. The javascript function is named artists


If say i was on a page named shop, is there a way where if i hit the artists button it will navigate to the home page and then auto execute the javascript function named artists.

Many thanks

Jibber4568
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


chrisman
post 3 May, 2008 - 06:30 PM
Post #2


New D.I.C Head

Group Icon
Joined: 22 Mar, 2008
Posts: 25

Do you mean an onLoad?

CODE
<body onload="java script:artists();">
<!-- All your fancy other stuff here -->
</body>


EDIT: Gah, it keeps inserting a space where it says "java script:art ...". There shouldn't be a space there.

This post has been edited by chrisman: 3 May, 2008 - 06:32 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

PsychoCoder
post 3 May, 2008 - 06:33 PM
Post #3


ToCode || !ToCode

Group Icon
Joined: 26 Jul, 2007
Posts: 5,858

Thats part of the forum software that does that smile.gif Prevents insertion of bad stuff
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

jibber4568
post 4 May, 2008 - 06:11 AM
Post #4


New D.I.C Head

*
Joined: 11 Feb, 2008
Posts: 31

Cheers guys. Should have known that myself really.

Thanks all the same though
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 5/17/08 03:53AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month