473,327 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Passing variable to an include via URL query string - a problemo

Hi,

Ive got a navigation bar for my web pages in an include (top_nav.asp).

On my homepage (index.asp) and all the other site pages I have a
reference to this include which includes my navigation bar in each
page.

<!--#include virtual="/includes/nav/top_nav.asp"-->

My problem is, is that I need to pass a URL querystring variable to
the top_nav.asp page. Im using this variable in Case statement to
highlight a table cell a different colour to indicate which bit of the
site they are in

I can do this fine with this <a
href="/content/table.asp?tab=table">Table</a>, but however this will
obviously only load the Nav Bar include page, and not the whole page.
When I point it the the index page <a
href="/content/index.asp?tab=table">Index</a>, the nav bar page does
not load correctly, its as if the include isnt seeing the querystring
variable.

Help!!!
Jul 21 '05 #1
2 2671
On 8 Nov 2004 07:55:29 -0800, jo***********@yahoo.co.uk (John Aspinall) wrote:
Hi,

Ive got a navigation bar for my web pages in an include (top_nav.asp).

On my homepage (index.asp) and all the other site pages I have a
reference to this include which includes my navigation bar in each
page.

<!--#include virtual="/includes/nav/top_nav.asp"-->

My problem is, is that I need to pass a URL querystring variable to
the top_nav.asp page. Im using this variable in Case statement to
highlight a table cell a different colour to indicate which bit of the
site they are in

I can do this fine with this <a
href="/content/table.asp?tab=table">Table</a>, but however this will
obviously only load the Nav Bar include page, and not the whole page.
When I point it the the index page <a
href="/content/index.asp?tab=table">Index</a>, the nav bar page does
not load correctly, its as if the include isnt seeing the querystring
variable.

Help!!!

IIRC,
All Includes are loaded BEFORE any code is interpreted, so your querystring variable is probably not seen by the
include file at the time it loads.
Jul 21 '05 #2
I suspected this was the case. Is there a way around it?

Turkbear <no***@nowhere.com> wrote in message news:<ed********************************@4ax.com>. ..
On 8 Nov 2004 07:55:29 -0800, jo***********@yahoo.co.uk (John Aspinall) wrote:
Hi,

Ive got a navigation bar for my web pages in an include (top_nav.asp).

On my homepage (index.asp) and all the other site pages I have a
reference to this include which includes my navigation bar in each
page.

<!--#include virtual="/includes/nav/top_nav.asp"-->

My problem is, is that I need to pass a URL querystring variable to
the top_nav.asp page. Im using this variable in Case statement to
highlight a table cell a different colour to indicate which bit of the
site they are in

I can do this fine with this <a
href="/content/table.asp?tab=table">Table</a>, but however this will
obviously only load the Nav Bar include page, and not the whole page.
When I point it the the index page <a
href="/content/index.asp?tab=table">Index</a>, the nav bar page does
not load correctly, its as if the include isnt seeing the querystring
variable.

Help!!!

IIRC,
All Includes are loaded BEFORE any code is interpreted, so your querystring variable is probably not seen by the
include file at the time it loads.

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Paul | last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and session.use_trans_sid = 1 in my php.ini file. Index.php contains:...
5
by: kazack | last post by:
I am a little confused with code I am looking at. My c++ book does not go into passing a structure to a function so I pulled out a c book which does. and I do not understand the prototype verses...
3
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) {...
5
by: Bill | last post by:
I need to pass a static parameter to an included ASP file. I'm thinking about using this with a query string, but upon reflection I'm not sure how I can do this. For example: ---file start:...
17
by: Charles Sullivan | last post by:
The library function 'qsort' is declared thus: void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *)); If in my code I write: int cmp_fcn(...); int...
6
by: Scott Zabolotzky | last post by:
I'm trying to pass a custom object back and forth between forms. This custom object is pulled into the app using an external reference to an assembly DLL that was given to me by a co-worker. A...
2
by: Keith | last post by:
Good Afternoon, New to .Net. I am trying to pass date/time values to a MS Access query depending on what value is selected from a dropdown list box (January, February, etc). I have declared...
3
by: James Robertson | last post by:
I am new to the ASP and VB thing so be kind. Question I have is that I have created an ASPX web site to use as an E-Mail page. But I want to use this for a lot of users. Can I create the link on...
11
by: kennthompson | last post by:
Trouble passing mysql table name in php. If I use an existing table name already defined everything works fine as the following script illustrates. <?php function fms_get_info() { $result =...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.