Forum Moderators: open

Message Too Old, No Replies

widget creation via javascript

         

kadnan

7:35 pm on Jan 26, 2009 (gmt 0)

10+ Year Member



hi friends,

I am trying to create a web widget which could be displayed on 3rd party sites. So far things are ok but I am trying to pass value from HTML file to inner javascript code. Code snippets given here:

1)file which will display badge
=================================
http://example.com/1318786

2)create_badge.js
==================
http://example.com/1318787

3)user_badge.js
===================

http://example.com/1318789

I want to pass value='adnan' to inner function sayHi().

How can I do it?

Thanks

[edited by: engine at 10:20 am (utc) on Jan. 27, 2009]
[edit reason] please use example.com [/edit]

eelixduppy

9:22 pm on Jan 27, 2009 (gmt 0)



If you have an ID assigned to that element, you can access it that way:


document.getElementById('[i]id_value[/i]').value