Irish SEO,  Marketing & Webmaster Discussion

 

Javascript No properties defined problem?

This is a discussion on Javascript No properties defined problem? within the Coding Help forums, part of the Webmaster Help category; hi every1 Well I have a script that is loaded when the page loads, its inline on the page and ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help

Register Forum Rules FAQDonate Members List Calendar Search Today's Posts Mark Forums Read


Notices

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-01-2008, 05:42 PM
Coder
Recent Blog:
 
Join Date: Mar 2007
Location: Kildare Ireland
Posts: 59
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Ciarán Mc Cann will become famous soon enough
Send a message via MSN to Ciarán Mc Cann
Default Javascript No properties defined problem?

hi every1

Well I have a script that is loaded when the page loads, its inline on the page and it used getelementByid method.

Code:
document.getElementById("my_id")
The only problem is that the id for this script dont load into the page when the page loads, they are only requested if you click a button. I.E an ajax request loads them to the page, but my script is already broken because it couldnt find the id's on the frist load?

In the passed I have include the id's as hidden elements in the html document and when the ajax request loaded my actually content they were removed, just wondering is there an easyer way to do it?

I have try alots of things, like loading the script with the id's in the ajax request but still nothing.
Thanks
__________________
http://simple2web.ie/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 03-01-2008, 06:01 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 2,048
Nominated 5 Times in 3 Posts
Nominated TOTW/F/M Award(s): 1
louie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enough
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

you need to create the id first either as span or div or etc...

if it's a div you can set it up as hidden.
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 03-01-2008, 06:29 PM
Coder
Recent Blog:
 
Join Date: Mar 2007
Location: Kildare Ireland
Posts: 59
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Ciarán Mc Cann will become famous soon enough
Send a message via MSN to Ciarán Mc Cann
Default

ok so basicly I am doing it the right way. I just thought that was sorta a hack of away. thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
defined, javascript, problem, properties

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Javascript problem ph3n0m Coding Help 1 21-06-2007 03:57 PM
javascript 7aken Coding Help 1 03-04-2007 03:50 PM
Javascript menu bug? ButtermilkJack Coding Help 1 15-01-2007 03:21 PM
Javascript Captcha for use on forms louie Coding Help 8 23-10-2006 09:22 AM
Javascript Menu Help (again...)? ButtermilkJack Coding Help 18 25-04-2006 12:32 PM


Sponsored links

Paid On Results


All times are GMT +1. The time now is 01:19 PM.


Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger

Search Engine Friendly URLs by vBSEO 3.2.0