Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 624627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:13:15+00:00 2026-05-13T19:13:15+00:00

I am using jQueryUI dialog to open a modal form on my site. The

  • 0

I am using jQueryUI dialog to open a modal form on my site. The form has a hidden input to pass on an affiliate code that is passed in the query string, like

http://mydomain.com/page1_with_form?affiliate=Chuck%20Norris

http://mydomain.com/page2_with_form?affiliate=Chuck%20Berry

I am using a jQuery plugin to make grabbing the GET values easy.

Both of the 2 pages (page1_with_form and page2_with_form) load the same modal form my_affiliate_form.html in a dialog box. I have no problem doing something like this on the my_affiliate_form.html page

var affiliate_code = $.query.get('affiliate');
if (!affiliate_code) affiliate_code = "None";
$('[name=hidden_affiliate_field]').val(affiliate_code);

This works just dandy, and my affiliate ends up being Chuck Norris and Chuck Berry.

The problem, is now I want to not only include the affiliate code from the query string, but also want to use a key that is representative of the page they loaded the form from, ie. page1_with_form and page2_with_form). For page1, the key might be “Public” and for page2 maybe “Private”, or something like that.

Now I want it where my hidden field has a value of “Public Chuck Norris” when hitting this page
http://mydomain.com/page1_with_form?affiliate=Chuck%20Norris
and “Private Chuck Norris” when hitting this page http://mydomain.com/page2_with_form?affiliate=Chuck%20Norris

I am loading the dialog contents like this:

$('#modal-form-holder').dialog({
          bgiframe:true,
          width:width,
          title: title,
          modal:true,
          resizable: false,
          closeOnEscape: true,
          draggable: false,
          autoOpen:false
 }).load("my_affiliate_form.html?affiliate_key=" + key, null, onComplete);

The value for key is getting filled in correctly, but if my_affiliate_form.html tries to grab the “affiliate_key” via $.query.get(‘affiliate_key’) it is empty. This is because the query plugin in inspecting window.location, which hasn’t changed.

How can I grab the request paraemeter in my_affiliate_form.html that came in the ajax request?

Sorry for being so verbose, I just want to make my question as clear as possible.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:13:16+00:00Added an answer on May 13, 2026 at 7:13 pm

    Set the value in your onComplete handler. Something like:

    $('#modal-form-holder').dialog({
              bgiframe:true,
              width:width,
              title: title,
              modal:true,
              resizable: false,
              closeOnEscape: true,
              draggable: false,
              autoOpen:false
     }).load("my_affiliate_form.html", null, function(responseText, textStatus, XMLHttpRequest)
    {
      onComplete(responseText, textStatus, XMLHttpRequest, key);
    });
    

    Then, in onComplete (which should be defined to take all four parameters), fill the affiliate_key field with key.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am tryng to use this: http://jqueryui.com/demos/dialog/#modal-form I have: <script type=text/javascript> $(document).ready(function() { $(#dialog).dialog();
I'm using the jQuery UI dialog with modal=true . In Chrome and Safari, this
I'm trying to display a modal form using jquery ui. I've adapted an example
I want this: http://jqueryui.com/demos/dialog/#modal-message to happend when you click on ClickMe. how to do
I am using the jquery dialog widget to display a modal box. However when
I am using jquery UI modal dialog with smoothness theme. It works fine except
Using jQuery/jQueryUI I want to populate a form using this HTML/JS show below. The
How can I change CSS from javascript . I'm using jQuery-ui Dialog and I
I am using the jquery-ui-dialog plugin I am looking for way to refresh the
I'm developing a site using jQuery, and jQuery UI tabs. For some reason, my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.