Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script taking to long error when passing dropdown control to pagemetho

Status
Not open for further replies.

tekkerguy

Programmer
Nov 16, 2005
196
US
I have some dropdowns, which are populated by ajax to prevent having to do a postback.

the problem is, I have one dropdown that populates another based on the first's selection.

This is working fine, and I can see the new entries in the second dropdown.

The problem is, if I do a view source, those new entries aren't in the second postback. I'm still seeing the old dropdown entries, but only in the view source. on the actual page itself the proper dropdown items are there. And when I do a regular submit, it submits the old selected value, as if the dropdown had never been repopulated, and I assume this is because the Page is not refreshed because the ajax pagemethod prevents a postback, as it should.



So I've created an ajax/javascript submit function instead.

I put each of the dropdown and textbox controls into an array, and pass that back to the pagemethod., but I keep getting a message that says the script on the page is taking too long, and it hangs.

Is there something I need to do to pass arrays to the c# pagemethod?



all other ajax functions are working
 
Anything that updates the DOM with Javascript is not shown in the source, the source is what is hard coded.

Dynamic data does not show when viewing source.

Example...
If you had a page that had a whole load of stuff between the body tag.

If you then made an ajax call and updated the body.innerHTML = 'what you got back from ajax call'

Then viewed the source code , you would see the original content , NOT what ajax changed it to.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top