Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Using jQuery to Reread HTML Components
Old 01-26-2011, 03:50 PM Using jQuery to Reread HTML Components
portkey's Avatar
Skilled Talker

Posts: 55
Name: Erica Dion
Trades: 0
I really hope this makes sense. I've got a script that generates a textbox using a form button. When you click on the textbox, a small module opens up using jQuery. Based on user inputs, it calculates a number and then proceeds to close the window and print the answer in the textbox. However, nothing gets printed. I've use Firefox Firebug to ensure that the jQuery code is all correct and it is, so my guess is since the textbox is generated AFTER the page is fully loaded, the new textbox doesn't register and therefore the jQuery script has no idea that it exists. Is there anything I can do to get around this? Thanks!
__________________
Hysterical Web Design

Please login or register to view this content. Registration is FREE

Fair priced and reliable web design services that complement your website needs
portkey is offline
Reply With Quote
View Public Profile Visit portkey's homepage!
 
 
Register now for full access!
Old 01-26-2011, 10:02 PM Re: Using jQuery to Reread HTML Components
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
By assigning a var name to the element, you can use that to control the element:

Code:
var textBox = $('<textarea/>');
 
$('body').append(textBox);
 
$(textBox).val('add a new value');
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 01-27-2011, 01:48 PM Re: Using jQuery to Reread HTML Components
portkey's Avatar
Skilled Talker

Posts: 55
Name: Erica Dion
Trades: 0
I did have that. Turns out I jumped the gun too fast and just assumed that something weird was going on. My event handler wasn't executing because the personal who wrote the tutorial forgot to assign the ID for the link so that it would execute. Last time I listen to a newbie programmer. Thanks though
__________________
Hysterical Web Design

Please login or register to view this content. Registration is FREE

Fair priced and reliable web design services that complement your website needs
portkey is offline
Reply With Quote
View Public Profile Visit portkey's homepage!
 
Reply     « Reply to Using jQuery to Reread HTML Components
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27925 seconds with 12 queries