www.webdeveloper.com
Results 1 to 2 of 2

Thread: sending variables through URL

  1. #1
    Join Date
    May 2007
    Posts
    19

    Question sending variables through URL

    I have a page that hides/shows various blocks of text, and I want to know if I can have that page load a specific section by sending variables in the url which would enable me to have more links on other pages to each section.

    Here's how each section changes:

    function StoryNavClick(strPage)
    {
    if (bLoaded)
    {
    if (strPage != strSelectedStoryPage)
    {
    // Unhighlight the previous navigation
    ChangeImage('nav_story_' +strSelectedStoryPage, 'nav_story_' +strSelectedStoryPage +'_off');

    // Highlight the new navigation
    ChangeImage('nav_story_' +strPage, 'nav_story_' +strPage +'_on');

    // Display the correct contents
    DocumentObject('story_overview_1', true).display = (strPage == "overview" ? 'inline' : 'none');
    DocumentObject('story_overview_2', true).display = 'none';
    DocumentObject('story_overview_3', true).display = 'none';

    DocumentObject('story_models_1', true).display = (strPage == "models" ? 'inline' : 'none');
    DocumentObject('story_models_2', true).display = 'none';
    DocumentObject('story_models_3', true).display = 'none';

    DocumentObject('story_custom_1', true).display = (strPage == "custom" ? 'inline' : 'none');
    DocumentObject('story_custom_2', true).display = 'none';
    DocumentObject('story_custom_3', true).display = 'none';

    iStoryPage = 1;

    // Store the selected section
    strSelectedStoryPage = strPage;
    }
    }
    }


    It's on an asp page, so what I want to do is this:
    http://www.[URL].com/Story.aspx?[variable]=[value]

    Will this be possible?
    Thanks for any help you may have

  2. #2
    Join Date
    Jun 2007
    Posts
    348
    If I understand what you're asking, the answer is yes. But that is all I can tell you without a clearer understanding of just how you're wanting it done.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles