Results 1 to 7 of 7

Thread: Querystring value in form with frames [Resolved]

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    Querystring value in form with frames [Resolved]

    I have this form with frames on it. This form is for authorities to come on and process the submitted form. The first frame is the submitted webform, and the second form is the authority's work form.

    On the webform I have code in the page_load event to check the querystring value of url and if an id value exists it will populate the webform by looking up the id in the database and place all values on the form for the authority to view.

    The problem is that the page_load event on the webform does not recognize the querystring variable passed to the form with frames, but the page_load does run, just the value of the id is "".

    Can anyone tell me how to pass the value from the frames form to the webform so the querystring value is not blank. That or tell me what it is that I should be doing differently to get this to work. That is assuming I made sense just now.

    Thanks again.
    Last edited by token; Feb 4th, 2005 at 09:52 AM.

  2. #2
    Addicted Member rdove's Avatar
    Join Date
    Dec 2002
    Location
    Indianapolis
    Posts
    251

    Re: Querystring value in form with frames

    Quote Originally Posted by token
    That or tell me what it is that I should be doing differently to get this to work.
    Don't use frames. There isn't a very easy way of doing this, the only thing I would beable to think of is using javascript to redirect to the frame location and concatenate the string you want in the querystring of the javascript redirect. But I've never done anything liek that before.

    So I stand by my suggest of don't use frames. There is always a way to do everything without frames.
    ~Ryan





    Have I helped you? Please Rate my posts.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    Re: Querystring value in form with frames

    I dont like using frames either, I havent used frames since i was in school. I was just trying to mimic something that was done in the previous application.

    Do you have any suggestions as to what i could do?

  4. #4
    Addicted Member rdove's Avatar
    Join Date
    Dec 2002
    Location
    Indianapolis
    Posts
    251

    Re: Querystring value in form with frames

    To get rid of frames? Or to make what you are trying to do work?
    ~Ryan





    Have I helped you? Please Rate my posts.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    Re: Querystring value in form with frames

    Either or.

    I would like to get what I'm doing to work, but an alternative would be just as good.

    The reason why frames would be good is that the webform is quite big and the authority needs to see and review the webform request. And based on the request they will complete another form to authorize the work and routing it to a vendor.

    Any suggestions?

  6. #6
    Addicted Member rdove's Avatar
    Join Date
    Dec 2002
    Location
    Indianapolis
    Posts
    251

    Re: Querystring value in form with frames

    Like I said you would have to use javascript to set the locations of the other frames.

    So in your main page where ou build the frameset you would have to have the querystring values you need sent to that page

    then in javascript you could do

    VB Code:
    1. parent.frameName.location.href = "page.aspx?var=<%= Request.Querystring("var") %>"

    Tht I beleive is in the only way you are going to be able to do this.

    btw..I jacked the skeleton of the code above from here:
    http://developer.irt.org/script/3.htm
    ~Ryan





    Have I helped you? Please Rate my posts.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    Re: Querystring value in form with frames [Resolved]

    I was able to fix my problem.

    On the main page holding the frames, I just edit the src attribute for the fram to read as follows:

    <frameset rows="70%,30%">
    <frame name=frame1" src="frmWebform.aspx?key=<%= Request.QueryString("key") %>">
    <frame name="frame2">
    </frameset>

    And she works like a charm. Found the solution posted on another forum, with someone trying to do exactly what i was doing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width