Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-21-2008, 05:41 PM   #1
Registered: Aug 2004
Location: London, UK
Distribution: Ubuntu 10.10, ubuntu 11.04, suse 9.2, OSX
Posts: 259

Rep: Reputation: 30
render a graphic in another webpage with options

Dear all,

I would like to be able to pass two variables to a webpage (php) that will be embedded in another webpage. This page has 4 options which can be given to the page.
Idealy I would like something where the user clicks on the form button and the embedded page reloads and shows the new image. However, I'll also go with a submit button (what I currently am working on). However doing it this way I run into the problem that when I click submit my first parameter isn't called back up for the page.

How can I get the 1st variable recalled up. ie
but when I hit submit I get
even thou I have (well I thought I did) coded for the 1st parameter to be there (the idnum). I used $_REQUEST and $SERVER['QUESRY']

Any pages or even code that someone can point me to for either the nicer auto reloading of the embedded page or the submit button way would be great.

Old 05-22-2008, 02:13 AM   #2
Registered: Aug 2005
Posts: 330

Rep: Reputation: 32
Try with an iframe and a bit of javascript. Here is the main script

PHP Code:
//js functions
document.getElementById("iframe_id").src="script2.php?param1=val1&param2=val1" //etc

<iframe name="iframe_name" id="iframe_id" src=""></iframe> 

PHP Code:
Of course you can also employ some ajax tricks but this also seems to do the job

Last edited by nc3b; 05-22-2008 at 02:14 AM.
Old 06-04-2008, 08:43 PM   #3
Registered: Aug 2004
Location: London, UK
Distribution: Ubuntu 10.10, ubuntu 11.04, suse 9.2, OSX
Posts: 259

Original Poster
Rep: Reputation: 30
thank you. I havn't got to implementing it yet so I might come back and ask but as always google is my friend


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphic Driver: How to set up Livna graphic support? Chuong Linux - Software 11 08-20-2006 02:15 AM
Webpage does not render correctly in Konqueror. Maritime Linux - Newbie 6 05-19-2006 08:17 PM
fix CSS HTML built webpage to render in IE titanium_geek Programming 5 01-30-2006 06:33 PM
Mozilla Won't Render Aram Linux - General 0 02-04-2002 12:00 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:50 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration