Dear sir/madam,
Is it possible to retrieve the items from a server side listbox using javascript in the code behind page?
More detailed: I have a page with a button on it. When this button is clicked a new window opens up (like a popup) where you can search for items. When you click Finish on the popup window, the idea is to write the items in the list on the popup to a list on the window that opened the popup.
This is what i ahve, but it doesn't work:
script = "<script type=""text/javascript"" > "
script += "for(i=0;i < document.frmPrompt.lstChosen.items.count;i++){ "
'script += "if(document.frmPrompt.lstChosen.Items.Selected){ "
script += "Response.Write(document.frmPrompt.lstChosen.Items.Text); } "
script += "</script>"
It says that it doesnt know the object document.frmPrompt.lstChosen.items
kind regards
Jelle
Is it possible to retrieve the items from a server side listbox using javascript in the code behind page?
More detailed: I have a page with a button on it. When this button is clicked a new window opens up (like a popup) where you can search for items. When you click Finish on the popup window, the idea is to write the items in the list on the popup to a list on the window that opened the popup.
This is what i ahve, but it doesn't work:
script = "<script type=""text/javascript"" > "
script += "for(i=0;i < document.frmPrompt.lstChosen.items.count;i++){ "
'script += "if(document.frmPrompt.lstChosen.Items.Selected){ "
script += "Response.Write(document.frmPrompt.lstChosen.Items.Text); } "
script += "</script>"
It says that it doesnt know the object document.frmPrompt.lstChosen.items
kind regards
Jelle