sir
I have html page a that have a link to page b.
Page b are very similar to page c and d,except some fields so I would like
to combine them as Page common.html.
Can I pass the parameter from page a.html so that the parameters can
determine which fields to be displayed in common.html? 1 1922
In article <K9bMd.253012$8 l.44142@pd7tw1n o>,
"timothy ma and constance lee" <ti******@shaw. ca> wrote: sir
I have html page a that have a link to page b.
Page b are very similar to page c and d,except some fields so I would like to combine them as Page common.html.
Can I pass the parameter from page a.html so that the parameters can determine which fields to be displayed in common.html?
The first file includes a little other stuff, but it does show you how
to pass a parameter. robert
How to pass a parameter:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Read variables</TITLE>
<SCRIPT type="text/javascript">
function foo()
{
var theData, newWindow, URLstring;
//You can pass around 2k of data.
theData = "?data=" + escape("boldpar agraph");
URLstring = "readVars.h tml" + theData;
newWindow = window.open(URL string,"Printab le",
"statusbar,menu bar,resizable,t oolbar,height=6 00,width=800");
newWindow.focus ();
}
// ------------------------------------------
// This function takes a Node n, replaces
// it in the tree with an Element node
// that represents an HTML <b> tag, and
// then makes the original node the
// child of the new <b> element.
// From: javascript: The Definitive Guide by David Flanagan
function embolden(node)
{
var bold = document.create Element("b");
var parent = node.parentNode ;
parent.replaceC hild(bold,node) ;
bold.appendChil d(node);
}
</script>
</HEAD>
<BODY onload='
alert("bold text next");
embolden(docume nt.getElementBy Id("inlineparag raph"));
alert("Try to open a new window next.");
foo();
//alert("Tried to open the window.");'>
<p><br>Lets open a window and pass data to the window.</p>
<p id="inlineparag raph">A Javascript function in this file
will bold <i>this</i> paragraph.</p>
<p id="boldparagra ph">A Javascript function in the call html file
will bold this paragraph <i>is</i> paragragh.</p>
</BODY>
</HTML>
How to read the parameter:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Read passed data</TITLE>
<SCRIPT type="text/javascript">
var theData;
function foo2()
{
var begin;
begin = location.search .indexOf("data= ");
if (begin >0 )
{
theData = location.search .substring(begi n+5,location.se arch.length);
theData = unescape(theDat a);
document.write( "<p>Here is the passed data:</p>");
document.write( theData + "<\/p>");
}
else
{
document.write( "Could not find passed"
+ " variable \"data=\" with escaped data.")
}
}
</script>
</HEAD>
<BODY onload='
alert("bold text in opener document");
opener.embolden (opener.documen t.getElementByI d(theData));'
<p>What is the deal?</p>
<SCRIPT type="text/javascript">
document.write( "<p>");
foo2()
document.write( "<\/p>");
</script>
</BODY>
</HTML>
Robert This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: timmy_dale12 |
last post by:
I need help with this one. I have a function that pastes a row. In
each row i am pasting a link which is to call a date picker javascript
function. This is the code that pastes the link :
link = document.createElement('a');
link.href ="javascript:show_calendar('document.form1.date',document.form1.date.value);";
img = document.createElement('img');
img.setAttribute("src","H:Diverse\\cal.gif");
link.appendChild(img);
|
by: Unregistered |
last post by:
I'm making an Intranet site for someone who is not very familiar wit
making websites, thus I would like to make it as simple as possible fo
her when she needs to update it.
The intranet site uses frames - one menu frame that is always present
and one frame into which the content is loaded. The intranet sit
features many, many links to both internal and external pages - i
internal pages within the intranet and external pages on the...
|
by: Shawn Windle |
last post by:
----begin node.h--------
#ifndef NODE_H
#define NODE_H
#include <iostream> //NULL
using namespace std;
class node
{
|
by: Rudy Ray Moore |
last post by:
Why is "Visual Studio .net 2003 7.1 c++" so much slower than VS6 at linking?
It looks like "Visual Studio .net 2003 7.1 c++" doesn't even do incremental
linking! I make one very minor change in a .cpp from one of my thirty
projects and the whole thing links! (I turned on verbose linking to verify
this.)
Is there something else I need to do to turn on incremental linking?
Rudy
|
by: Steve McLellan |
last post by:
Hi,
Sorry to repost, but this is becoming aggravating, and causing me a lot of
wasted time. I've got a reasonably large mixed C++ project, and after a
number of builds (but not a constant number) linking (and sometimes
compiling) becomes immensely slow, and task manager shows that link.exe (or
cl.exe) is barely using any processor time, but an awful lot of RAM (around
150-200MB). I'm going to keep an eye on page faults since I can't...
| |
by: Luis E Valencia |
last post by:
Read from above to top.
I didnt understand.
This is the code that fills that datagrid
Public Sub pasar(ByVal sender As System.Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs)
|
by: Mitul |
last post by:
Hello friends,
I need some help for link redirect. I am currently working with a b2b
site. I had define some rules in htaccess but due to auto append of
PHPSessionID at the end of link I could not do it properly so can any
one help me how to avoid that auto appand on phpsessionid at the end of
link.
for example I have a link like:
|
by: HornyLaBelle |
last post by:
I'm hiding the email address on a website with this javascript which
works fine:
---------------------------------
<p>Send your comments and questions to our
<script language=javascript>
<!--
var contact = "Newsletter Editor"
|
by: Amy |
last post by:
Hello this script was switched to one with a timer. But now it doesn't
work right. The items in the left are supposed to be the link names,
and the items in the right are supposed to be the link addresses. When
it was switched from a day rotation to a timed rotation something is
keeping it from working as a link. Can anyone see why? Please let me
know, thanks, Amy
one that works by day just following and works correctly. <BODY...
|
by: yangsuli |
last post by:
i want to creat a link
when somebody click the link
the php script calls a function,then display itself :)
i have tried
<a href=<? funtion(); echo=$_server ?>text</a>
but it will call the function whether i click the link
then i tried this (using forms)
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |