- <html>
-
<head>
-
-
<script type="text/javascript">
-
var element;
-
function test(){
-
abc = document.getElementById('promptbox').value;
-
document.forms['form0'].elements[element].value = abc;
-
return true;
-
}
-
-
function prompt() {
-
el = document.getElementById("prompt");
-
el.style.visibility = (el.style.visibility == "visible") ? "hidden" : "visible";
-
}
-
-
<!--
-
function callPrompt(elementID){
-
element = elementID;
-
prompt2('btn1p.gif', 'My Prompt','Please enter your information', 'myfunction');
-
prompt();
-
}
-
//-->
-
-
var response = null
-
-
function prompt2(promptpicture, prompttitle, message, sendto) {
-
promptbox = document.createElement('div');
-
promptbox.setAttribute ('id' , 'prompt')
-
document.getElementsByTagName('body')[0].appendChild(promptbox)
-
promptbox = eval("document.getElementById('prompt').style")
-
promptbox.position = 'fixed'
-
promptbox.top = '150px'
-
promptbox.left = 0
-
promptbox.border = 'outset 1 #bbbbbb'
-
-
document.getElementById('prompt').innerHTML = document.getElementById('prompt').innerHTML + "<table cellspacing='0' cellpadding='5' border='5' width='400px' height='400px' class='promptbox' align='center' bgcolor='#ededed'><tr><td align='center'><table><tr><td><br>" + message + "</td></tr><tr><td align='center'><input type='text' value='' name='promptbox' id='promptbox' onblur='this.focus()' class='promptbox' align='center'></td></tr><tr><td align='right'><br><input type='button' class='prompt' value='OK' onMouseOver='this.style.border=\"1 outset #dddddd\"' onMouseOut='this.style.border=\"1 solid transparent\"' onClick='prompt();test();'> <input type='button' class='prompt' value='Cancel' onMouseOver='this.style.border=\"1 outset transparent\"' onMouseOut='this.style.border=\"1 solid transparent\"' onClick='" + sendto + "(\"\"); document.getElementsByTagName(\"body\")[0].removeChild(document.getElementById(\"prompt\"))'></td></tr></table></td></tr></table>"
-
-
document.getElementById("promptbox").focus()
-
}
-
-
function myfunction(value) {
-
-
if(value.length<=0)
-
return false;
-
else
-
document.getElementById('output').innerHTML="<b>"+value+"</b>";
-
}
-
</script>
-
-
<style type="text/css">
-
#prompt {
-
visibility: hidden;
-
position: absolute;
-
left: 0px;
-
top: 0px;
-
width:100%;
-
height:100%;
-
text-align:center;
-
z-index: 100;
-
}
-
-
#prompt div {
-
width:300px;
-
margin: 100px auto;
-
background-color: #fff;
-
border:1px solid #000;
-
padding:15px;
-
text-align:center;
-
}
-
-
body {
-
height:100%;
-
margin:0;
-
padding:0;
-
}
-
</style>
-
-
</head>
-
<body>
-
<form name="form0"><br><br><br><br>
-
<table align="center" width="500"><tr><td>
-
Click on a textbox and dialog will appear, The issue is I want each textbox individualized so when the dialog info is entered, its inputted into the correct textbox. I need the dialog to recognize which textbox was clicked thru iteration as there may be hundreds of textboxes.
-
</td></tr></table>
-
-
<p align="center">
-
input1 <input type="text" name="input" id="input1" size ="30" onClick="callPrompt(this.id);"><br><br>
-
input2 <input type="text" name="input" id="input2" size ="30" onClick="callPrompt(this.id);"><br><br>
-
input3 <input type="text" name="input" id="input3" size ="30" onClick="callPrompt(this.id);"><br>
-
And so on.....<br><br></p>
-
-
<table align="center" width="500"><tr><td align="left">
-
Example:<br>
-
I click on textbox "input1".....dialog appears,<br>
-
I enter "Hello World!".....Then click "Ok",<br>
-
textbox "input1" is filled in with "Hello World!"<br>
-
<br>
-
I click on textbox "input2".....dialog appears,<br>
-
I enter "Hello World again!".....Then click "Ok",<br>
-
textbox "input2" is filled in with "Hello World again!"<br>
-
<br>
-
I click on textbox "input3".....dialog appears,<br>
-
I enter "and again Hello World!".....Then click "Ok",<br>
-
textbox "input3" is filled in with "and again Hello World!"<br>
-
And so on.....
-
</td></tr></table>
-
</form>
-
-
</body>
-
</html>
1 1371 acoder 16,027
Recognized Expert Moderator MVP
What doesn't work? What exactly do you expect it to do and what happens instead?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Patient Guy |
last post by:
Has anyone written code that successfully manipulates binary file data
using Javascript?
It might---and in the case of doing I/O, will---make use of browser-
specific functions (ActiveX/COM with Internet Explorer, XPCOM/XPConnect
with Mozilla/Firefox).
I am writing client-side code that will generate binary data for producing
a GIF file...
|
by: minnesotti |
last post by:
Hi there,
I subscribed to a photographic pictures-hosting website which is heavy
on JavaScript. My preferred latest browser Mozilla Firefox does not
work with it -- no pictures are displayed and no buttons react to
clicking. The website's helpdesk says it should work with Firefox, and
could not offer any more advices. The JavaScript Console...
|
by: Matt Kruse |
last post by:
http://news.zdnet.com/2100-1009_22-6121608.html
Hackers claim zero-day flaw in Firefox
09 / 30 / 06 | By Joris Evers
SAN DIEGO--The open-source Firefox Web browser is critically flawed in the
way it handles JavaScript, two hackers said Saturday afternoon.
An attacker could commandeer a computer running the browser simply by
crafting...
|
by: google |
last post by:
I am trying to complete a javascript application and am having problems
with code similar to that show below.
Much testing has shown that Firefox finishes the code shown in around
0.25 secs but Internet Explorer 6 takes a massive 3.5 secs! Internet
Explorer 7 gets it down to around 2 seconds - but that's still 8 times
slower than Firefox...
|
by: Eric |
last post by:
I have a user of a web application written in Java/JSP that is unable
to login to the site simply because certain links on the page do not
run when they are clicked. Other popups using Javascript on the same
page work correctly.
It appears to be isolated to 1-2 machines in a particular network. I
cannot verify whether these machines have...
| |
by: tim |
last post by:
I am using foldoutmenu 3 and am having problems with viewing my menus
in firefox. On my sub3 menus i have more than one line of text in some
places. firefox does not recognise that there is more than one line
and the text simply overlaps the sub-menus below it. I thought i had
got around this by placing empty 'spacers' like so;
...
|
by: TonyV |
last post by:
Hi all,
I'm trying to use some javascript code in Internet Explorer 6.0 that's
being generated by a Perl file. I have a line in my header that looks
something like this:
<script src="jscode.pl?parm1=foo&parm2=monkey" type="text/javascript" /
Just for the sake of simplicity, here's a very simplified version of
the Perl code:
|
by: Prisoner at War |
last post by:
Hi, All:
I have a JavaScript search engine that always causes MSIE 7 to do a
top-of-page security "warning" (that top-of-page-bar, and not an
"alert" )...but other websites' JavaScripts do not trigger
that...what's going on? When I visit other JavaScript sites there's
no warning and the scripts work fine, but mine (it's still under...
|
by: rameshk_tvm |
last post by:
Hi,
I have created a web page with javascript, its successfully working in
firefox but not in internet explorer version 6 and 7.
I am not good in scripting and I have done this page with the help of
my friend.
I have uploaded the zip file. It contain two directories one is for
web page (php_files) other for support file (Support_Files).
|
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...
|
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...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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...
|
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...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
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...
| |