NUB Javascript Question

  • genxservers
  • Novice
  • Novice
  • genxservers
  • Posts: 30

Post 3+ Months Ago

assuming that this code works:

Quote:
var obj_ta = document.REPLIER.Post;


can anyone show me to how get this to work?

Quote:
currentField = "Post";

var obj_ta = "document.REPLIER." + currentField;


Thanks ahead of time.[/quote]
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • RichB
  • Guru
  • Guru
  • User avatar
  • Posts: 1121
  • Loc: Boston

Post 3+ Months Ago

I think the eval function will suit your needs:

Code: [ Select ]
var obj_ta = eval("document.REPLIER." + currentField);
  • genxservers
  • Novice
  • Novice
  • genxservers
  • Posts: 30

Post 3+ Months Ago

Cool .. that worked.

Thanks alot. I knew it was a ismple proplem but I dont know Javascript.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 108 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.