Hi everyone!

this is Rupam, I've been building a web application where I need to include a web page where I'll display images from two different tables in a database.

I want to show only two images one from each table at a time, i.e. in one page. What I meant to say is, I'll have a navigation option for the images so that the visitor can navigate through the images. For instance,

Previous | Image from table 1 | Next

Previous | Image from table 2 | Next


So when the visitor clicks Next adjacent to the Image from table 1, he can see the next image in table 1 . Similarly if he clicks the Previous adjacent to the Image from Table 1, he can see the previous image in table 1 and so on.

I've successfully completed this but I am now in a position that if I click the Previous or Next adjacent to Image from table 2 , the page gets refreshed and though I'm able to see the prvious or next image whatever it is but I'm unable to get the same image from the table 1.


Say for instance, the images from table 1 are named as img1tbl1.gif, img2tbl1.gif , img3tbl1.gif........ and the images from table 2 are named as img1tbl2.gif, img2tbl2.gif , img3tbl2.gif........ And I've navigate to img3tbl1.gif and now I want to navigate to img2tbl2.gif. But as soon as I click on Next adjacent to Image from table 2, I reach to img1tbl1.gif as the first image and img2tbl2.gif as the second image.

One more thing that I should mention I've used two forms in the same page.


I hope I'm able to make you all understand my problem . If any more clarifications required please feel free to ask me. I'll highly appreciate your help and guidance..

Rupam Datta
Bangalore

Recommended Answers

All 2 Replies

hi,

you can use AJAX for the same, or you can send the QueryString to the page which will have the id or other tables image,

like yourPage.asp?ID_of_table1Image=2& current_imageID_of_table2=5

post your code here so that we can help you in more detail...

Rahul Dev Katarey

You might also try storing the results of your database query in a session variable. Then you could call for that variable on the next page.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.