Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Passing variables from one page to another ....
Old 10-01-2005, 09:18 AM Passing variables from one page to another ....
Experienced Talker

Posts: 31
Trades: 0
Hi, I am using Actinic e-commerce to create a selling site and want some help with the following.

Imagine that i have a page, call it P1.html, and on this page there are links, both image and text, to sub-pages, which we can call P1.1.html, P1.2.html, P1.3.html etc

P1
>>>P1.1
>>>P1.2
>>>P1.3

What I want to be able to do, is send the images and text used to indicate P1.1.html on page P1.html to P1.1.html itself, to use as a header.

If this doesn't make sense i can pull an image together, but may need to e-mail it directly to you ??

Else, hope you can help.
simonwar is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-01-2005, 12:29 PM
mikeroq's Avatar
Skilled Talker

Posts: 92
Name: Mike Roq
Location: Lakewood, CO
Trades: 1
Ok, I do not understand what the hell you are thinking of doing, but you could use frames or an iframe, idk
__________________
CodingHub.com
mikeroquemore.com
mikeroq is offline
Reply With Quote
View Public Profile Visit mikeroq's homepage!
 
Old 10-02-2005, 09:40 AM OK, lets start the description again ...
Experienced Talker

Posts: 31
Trades: 0
Simple 'Contents' and 'Page' type stuff as found in any book you pick up from the library.

In the Contents, you get a list of the contents of the book,

Section 1.0 Some Stuff page X
Section 2.0 Some Other Stuff page Y

on my website you get exactly the same principal and the following;

A thumbnail image for the section, IMAGE
A title for the section, TITLE
A small description of the section, DESCRIPTION

(hopefully you get this, as just about every website i've seen uses this principal)

The idea being when you click on a IMAGE, (or the TITLE), it opens that page and that page is headed with that detail.

Normally this would be easy as I would manually generate the page in DW and add the correct image, title and description.

But i am using a template based package, Actinic ECommerce to blow the html and therefore need to pass variables from one page to the next, and modify an Actinic template with new code.

But I have never done this before and could do with some help.

What I imagine happens is that when i click on my 'image' or 'section title' it actions some code that allocates the image, title and text to three variables, and then when i open my new page it looks for these variables and uses them to reproduce the detail ?

Am I on the right road ?
simonwar is offline
Reply With Quote
View Public Profile
 
Old 10-02-2005, 10:12 AM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Not sure what you are asking at all!

Unless you are trying to describe in some convoluted way a product category page and a product item page that opens when the product is clicked. Which any standard shopping cart/catalogue will do

If not post a URL of what you are trying to achieve
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-02-2005, 10:37 AM
howardroark's Avatar
Extreme Talker

Posts: 181
Trades: 0
Quote:
Originally Posted by simonwar
What I want to be able to do, is send the images and text used to indicate P1.1.html on page P1.html to P1.1.html itself, to use as a header.
Are you asking if it's possible to send variables so you can display something depending on which link the visitor clicked
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
howardroark is offline
Reply With Quote
View Public Profile Visit howardroark's homepage!
 
Old 10-03-2005, 10:26 AM
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
It would take you quite a while to do with simple coding. Instead, use the long way round of creating the pages manually. I believe GD can be used, but I am only just getting to grips with PHP basics.
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.
Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Old 10-03-2005, 12:15 PM
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
I I understand correctly, you can do this like this with javascript, but you can do it similarly with ASP, PHP etc:
Hre's page 1:

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

	<head>
		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
		<title>Untitled Page</title>
		<script type="text/javascript"><!--
function goAndPassVar(link,title,img) {
	document.location.href = link.href + "?img=" + img + "&title=" + title;
}
//-->
</script>
	</head>

	<body bgcolor="#ffffff">
		<p><a href="p2.html" onclick="goAndPassVar(this,'Google Title Text','http://www.google.com/intl/en/images/logo.gif'); return false;"><img src="http://www.google.com/intl/en/images/logo.gif" alt="" border="0"><br>
				Google</a></p>
	</body>

</html>
Here's page 2:

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

	<head>
		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
		<title>Untitled Page</title>
		<script type="text/javascript"><!--
function cbegeturlArguments() { 
	var idx = location.href.indexOf("?"); 
	var params = new Array();
	if (idx != -1) { 
		var pairs = location.href.substring(idx+1, location.href.length).split("&"); 
		for (var i=0; i<pairs.length; i++) { 
			nameVal = pairs[i].split("="); 
			params[i] = nameVal[1]; 
			params[nameVal[0]] = nameVal[1]; 
		} 
	} 
	return params;
}

function showMyStuff() {
	var urlArgs = cbegeturlArguments();
	if (urlArgs["img"] != undefined) {
		document.getElementById("myImg").src = urlArgs["img"];
	}
	if (urlArgs["title"] != undefined) {
		document.getElementById("myTitle").innerHTML = unescape(urlArgs["title"]);
	}
}
//-->
</script>
	</head>

	<body bgcolor="#ffffff" onload="showMyStuff()">
		<p><img src="http://us.yimg.com/i/ww/beta/y3.gif" id="myImg" alt="" border="0"></p>
		<h1 id="myTitle">Yahoo Title Text</h1>
		<p id="myTitle">One for all and all for one, Muskehounds are always ready. One for all and all for one, helping everybody. One for all and all for one, it's a pretty story. Sharing everything with fun, that's the way to be. One for all and all for one, Muskehounds are always ready. One for all and all for one, helping everybody. One for all and all for one, can sound pretty corny. If you've got a problem chum, think how it could be.</p>
	</body>

</html>
You'll see that if you open page 2, it's got yahoo stuff as default. If you click on the link from page 1 to go to page 2 it passes the img and title to the page and the script in page 2 will replace what's there with your passed data. You dig? Is the what you were looking for?
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Old 10-03-2005, 01:08 PM A few answers to all of the replies ......
Experienced Talker

Posts: 31
Trades: 0
to chrishirst
Couldn't have described it much better I'm afraid, but not to worry some of the other guys have got it. Read on it may become clear. Thanks anyway.

to howardroak
Yes is the answer to that one.
If a link on a page os represented as an IMAGE, a TITLE and a DESCRIPTION, and the IMAGE and TITLE a links, then if you click on IMAGE or TITLE on PAGE1, it sends the detail of the IMAGE, TITLE and DESCRIPTION to the 'linked to' page, call it PAGE2. Does ths make sense?

to Twitch
You may be right and I may have to resort to manually dropping the links on to my pages later, but i will look at some of the other advice and see what happens, cheers.

to funkdaddu
OK, I'll try this later and get back you.
simonwar is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Passing variables from one page to another ....
 

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28194 seconds with 12 queries