I’m so tired from banging this problem around all day, I hope I can
explain it succinctly & accurately.
I want to execute a function immediately following a click on <input
type="RESET"...
The function will insert today’s date into a <input type="TEXT"… field.
It does it just fine with <form onload="insertD ate();" where inside the
‘insertDate’ fn, I have document.form.d ateField.value = dateString. The
closest I’ve been able to do anything to repopulate <input type=”TEXT”
name=”dateField ”… is with the onMouseOut event handler associated with
the <input type=”RESET”… object. Aaarrghh!
Here’s kind of an example:
<script>
// global var
var dateString = ""
function insertDate()
{
// …code that assigns formatted string for today’s date
dateString = dayname[weekday]+" "+day+" "+monthname[month]+" "+year;
}
</script>
</head>
<body...
<form onLoad="insertD ate();"...
<input type=”text” name=”dateField ” readonly>
..
..
..
<input type="reset" name="reset" value="reset".. .
on... I don’t know what (eventHandler) can execute a function call after
RESET is executed>
I’ve even tried a dummy (pseudo) reset where RESET is a mere ‘button’
and I can call any function I want thru the onClick handler; but then
I can’t restore radio buttons to their default (initialized at form
load) values.
Any assistance will be genuinely appreciated!
Maybe you have solutions for both problems (automatic restoration of
dateString following RESET *** AND *** reassigning programmaticall y the
radio values?!?
beaucoup thanx in advance,
Chuck
== 2 2643
"Charles M. Fish, Sr." <Am************ **@notDot.com> wrote in message
news:3F******** ******@notDot.c om... I’m so tired from banging this problem around all day, I hope I can explain it succinctly & accurately.
I want to execute a function immediately following a click on <input type="RESET"...
<snip>
<input type=reset onclick="docume nt.f.txt.value= 'whatever';">
doesn't work, but
<input type=reset onclick="setTim eout('document. f.txt.value=\'H i.\';',1);">
has no probs.
HTH
Ivo
Whoops, please ignore my ignorance about the backslashes!
I realize that they're for escape-apostrophe.
Still, any way to plug in a variable, not literal, value in a <input
type="text"... ???
TIA,
C
==
Charles M. Fish, Sr. wrote: Ivo, Hi... Thank you for your reply.
I'm still having difficulties with getting something (*anything*) to occur upon execution of <input type="reset"...
I tried your suggested line (verbatim except for substituting order & orderDate) and my Netscape | Tools | Web Development | Javascript Console returns:
Error: unterminated string literal Source Code: setTimeout('doc ument.order.ord erDate.value=\' Hi.\';',1);">
I don't understand the pair of backslashes surrounding 'Hi. are they supposed to swap a string literal for a variable?
Again, I want to restore a variable( not a literal) to a readonly text field after executing a true "reset".
Is it possible?
TIA C ==
Ivo wrote:
"Charles M. Fish, Sr." <Am************ **@notDot.com> wrote in message news:3F******** ******@notDot.c om...
I’m so tired from banging this problem around all day, I hope I can explain it succinctly & accurately.
I want to execute a function immediately following a click on <input type="RESET"...
<snip>
<input type=reset onclick="docume nt.f.txt.value= 'whatever';"> doesn't work, but <input type=reset onclick="setTim eout('document. f.txt.value=\'H i.\';',1);"> has no probs. HTH Ivo This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mike Copeland |
last post by:
In the following code I am calculating 2 values when the "Compute
Distance" button is pressed. I would like to find a way to "return" both
value to the form so I can show both when the calculation is made. (one
is merely the doubling of the computed result.)
I have cobbled this form from several places, and I don't remember
enough of HTML or JavaScript to know where to seek additional
information. The code below does the calculation,...
|
by: RelaxoRy |
last post by:
If I fill out the textfields properly with Name, Email etc in a row it
is fine. But if I fill out, for example, my Name, then tab twice, it
clears my entered value. How do I stop this?
All I want the script to do is that when the cell is blank or
whitespace, put the necessary text in the field, else, continue as
normal.
--- HTML Extract
|
by: Matt |
last post by:
i need to implement a clear button to clear all the fields in the
form,
but i am thinking i can just use reset button.
<input type="reset" name="reset" value="CLEAR">
The first thought is that if there is default value reset and clear
will become different.
My understanding is that reset means to restore the original page
before
|
by: Kermit Piper |
last post by:
Hello,
How can you clear session variables when a reset button is pressed? I
thought I might be able to do something like:
<%
If request.form("Reset") = "Reset" then
Session("variable") = Null
%>
|
by: mk |
last post by:
Greetings all - im new to this newsgroup so pls dont flame me :p
I need some help! Please view the html below in a browser. Or goto this
url -http://firebrain.co.uk/java-problem.htm
(Assuming you have seen the rendered code)
Basically I need the X buttons to change all the values of each textbox
to zero either in the col or row depending on which button is clicked.
Function summery:
If you click on a X button on the right hand side of...
| |
by: comp.lang.php |
last post by:
I thought my function would have accomplished just that:
if (!function_exists('resetCSV')) {
function &resetCSV($fullFileName, $path, $willClearFile = false) {
/*------------------------------------------------------------------------------------------------------------------------------------------
New 8/23/2006: This function will either reset the second column
of a CSV file (clearing the column of values) or clear file if
|
by: pat270881 |
last post by:
hello,
i should implement this class:
namespace test_1
{
class statistician
{
public:
// CONSTRUCTOR
|
by: comp.lang.php |
last post by:
// NEW 11/27/2006: FINALLY, IF YOU ADDED OR DELETED OR DID ANY KIND OF
FORM ACTION SUCCESSFULLY, DON'T RE-DISPLAY THE NEW EXPENSE ITEMS VIA
$_POST
if ($_POST && (!is_array($leaseObj->errorArray) ||
@sizeof($leaseObj->errorArray) == 0)) {
print_r(array_keys($_POST));
@reset($_POST);
$tempPost = $_POST;
foreach ($_POST as $key =$val) if (strpos($key, 'new_') === 0)
array_remove($tempPost, $tempPost);
|
by: karsagarwal |
last post by:
I have a bounded form and after I click the button to update/save. THe
fields are still there. Is there a way to clear off the fields in the
bounded form.
Thanks,
SA
Here's the code that I have:
Private Sub cmdSave_Click()
|
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
| |