Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 31st, 2007, 01:34 AM
Registered User
 
Join Date: Dec 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default calling other ASP pages in DIV using AJAX

hi,

hope someone can shed a light on this,

we had a modification to an asp page that required the functionality of another existing asp page, so instead of redeveloping, we are simply calling that other asp page into a div by using ajax call back.

we are required to call it into a div because we have to have it hidden until the user clicks a particular record, then he can edit the details in the form we called up in the div (we pass the details to the form via query strng using javascript as the user clicks the record)

everything seems to work fine, i get everything, all identifiers for fields and all that stuff EXCEPT the javascript...

if I can get all the fields intact, how come I cant access any javascript? i get an object expected error.

Any suggestions ?

 
Old January 31st, 2007, 08:25 AM
Authorized User
 
Join Date: Dec 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Possibly something to do with Response.ContentType?

If it is text/xml try changing it to text/html.

 
Old January 31st, 2007, 10:15 AM
Registered User
 
Join Date: Dec 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I checked that, the response.contenttype is "text/html"

also experiencing another problem, once the form is called into a div the first time, all is working fine. but as the user changes the records and i call successive callbacks (any call back after the initial callback). I'm also unable to access the html elements via their ID.

I'll post a solution here if i ever figure this out

 
Old February 5th, 2007, 01:52 AM
Authorized User
 
Join Date: Nov 2005
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think you will need to have the div tag in that asp page with same id,
So that when data on the page is replaced with new record it should have the same div tag in it to be accessible for next call.

Let me know if its helpful.


Best Regards,
Vivek.
 
Old February 5th, 2007, 08:48 AM
Registered User
 
Join Date: Dec 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanx Vivek,

but it was my own fault that the div was working the first time and not the second time around. The problem was that I wasnt clearing the innerHTML for the div after the first callback, when the user clicked the second time, the form was imported again in the second div creating a conflict of identifiers.

well got around that, was my mistake sorry.

but I still couldnt access the javascript array from the master page in the child form which was called into the div, although I could see it in the debugger in the innerHTML of the div, but still the master page js wouldnt access it.

I got around this problem by generating the js array required for ALL the records on the master page, instead of the detail.

its not a very good design but at least i got the form working...

Quote:
quote:Originally posted by vivek_inos
 I think you will need to have the div tag in that asp page with same id,
So that when data on the page is replaced with new record it should have the same div tag in it to be accessible for next call.

Let me know if its helpful.


Best Regards,
Vivek.





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 2.0 Ajax raminriahi General .NET 2 September 5th, 2007 12:48 PM
div within a div and inherting the height brettdavis4 CSS Cascading Style Sheets 1 January 23rd, 2007 09:59 AM
AJAX Using ASP sethumail2000 BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 March 7th, 2006 12:29 AM
Passing values between Asp to Asp pages. jayaraj ASP.NET 1.0 and 1.1 Professional 3 May 23rd, 2004 06:53 AM
Varibles between asp.net and Asp Pages koneruvijay VS.NET 2002/2003 1 February 23rd, 2004 04:32 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.