tricky javascript problem requires javascript guru !
Hi,
I am complete JavaScript novice and would really appreciate some help with
this code:
=====================================================================
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/ssdb.asp" -->
<%
Dim rs_news_edit
Dim rs_news_edit_numRows
Set rs_news_edit = Server.CreateObject("ADODB.Recordset")
rs_news_edit.ActiveConnection = MM_ssdb_STRING
rs_news_edit.Source = "SELECT * FROM tblnews"
rs_news_edit.CursorType = 0
rs_news_edit.CursorLocation = 2
rs_news_edit.LockType = 1
r...
javascript within a javascriptHello,
I have a multi-frame page. The frames are named Frame_1, Frame_2 and
Frame_3.
Frame_1 has a drop down box. When a value is selected in this drop
down box, Frame_2 is updated using an asp file (as I have to read from
a back-end access database).
In turn in the asp file, I have a Body onload tag to execute a
javascript function within Frame_2. this function updates the contents
of Frame_3.
Till now this is working fine.
Here is the problem. Frame_3 has a form with a radio button. When a
radio button is selected, I want that a function be executed in
Frame_3.
However since conte...
regex and JavascriptHi -
I've never tried using regular expressions with JS. Can someone help me
with a simple one?
I have a field that a user inputs that looks for an integer, or a some
integers with a decimal then does some calculations and converts it to
currency. Problem is, that if i have to recalculate, that field now has
a "$" in it which throws off calculations. I'd like to look at the
field and if there is a "$", strip it out, do the calculations, etc.
So, something like:
function getDollar() {
myAmount = window.document.form.amount.value;
//here is where i want to look f...
regEx in JavascriptHi,
I'm new to javascript and regEx and trying to solve the following
problem.
I have a function which validates the password if there is a number:
-------------------------------------------------
function findNumeric(str_obj){
regEx = /\d/;
if (str_obj.match(regEx))
return true;
else
return false;
}
--------------------------------------------------
The problem arises when I put a password with a space in between e.g:
'test test1'. The fucntion returns false. I've tried '\s' in the
regEx but the user can put the space anywhere..
Any idea how to sol...
Javascript and IE? Javascript and C#?While my question might be simple, the environment around it is
terribly messy and so I will try to keep this clear and simple by only
including the relevant code - however, as I will soon suggest, I worry
that the problem isnt in what would seem to be the relevant code but
instead is lost somewhere in the do-and-donts of the peripheral code.
So at the end, i'll try to include all the affected code and you can
see if any of its actually relevant. I know there is a lot going on...
sorry, but I tried to write this clearly.
So here is what I imagine to be relevant. I'm working with a pa...
JavaScript RegexDear JavaScripters:
I have not found quite the detail that I need for regexes. If
you have a URL to a good site, please post it. In particular, how do
I group subexpressions?
I wish to parse a string to see if it is a valid fixed-decimal
value.
I start with
/^
How do I check a set of characters optionally? I want to check
for a sign character. The string might start with "+" or "-", but if
it starts with neither, that is fine. Do I leave an empty choice in a
parens set? Is it then
([+-]|)
or
[+-]?
?
Then come...
a javascript problemIn IE this javascript cod for Date works perfectly, for a eksample:
25.12.2004. but in other Internet Viewers like Firefox or Natescape, it
writes 25.12.104.
Can enybody help me. And Happy Christmas to you all!
here is the code
myvar = new Date();
Month = (myvar.getMonth() + 1)
Year = (myvar.getYear())
if (Month == 1) {WordMonth = "1";}
if (Month == 2) {WordMonth = "2";}
if (Month == 3) {WordMonth = "3";}
if (Month == 4) {WordMonth = "4";}
if (Month == 5) {WordMonth = "5";}
if (Month == 6) {WordMonth = "6";}
if (Month == 7) {WordM...
Javascript problem.Try out the code below in an HTML file please. The problem is with the
javascript. I can't get the body to change. The code below is PHP
generated. Firefox says the problem is show() does not exist AFTER I
click on the link display[ link displayed says: test ]
<html>
<script>
function show( s ){
document.write("<table><tr><td>"+ body( s ) +"</td></tr></table>");
return 0;
}
function body( s ){
t = ' ';
if ( s == "home" ){
t += "hi home<BR><BR>";t += "<a href=\&quo...
Javascript problem?Hello,
I have a small javascript on page that seems to affect the spacing
further down on the page. That is, I have a large space between two
unrelated HTML sections and when I remove the script, the space goes
away. The page does validate with or without the script.
You can see this on a test page at
http://www.usernomics.com/ergonomic-products-data%20NEW.html . Note
the space between the red text and the first table. The javascript is
below.
Can anyone see what might be causing the problem?
Thanks,
Bob
The section containing the javascript looks like this:
...
its a javascript problemI'll really appreciate if some could help me on a javascript issue
I want to check a form text-box that wheather its an array of
form-fields with same name or its a single
though i think i m asking in wrong room but i know there must b some
one who can help me
uday wrote:
> I'll really appreciate if some could help me on a javascript issue
>
> I want to check a form text-box that wheather its an array of
> form-fields with same name or its a single
>
> though i think i m asking in wrong room but i know there must b some
> one who can help me
...
Javascript Problem!I am developing a site at http://www.nwlmi.org.uk
The problem lies with the CSS/XHTML Menu which relies on JavaScript to
open and close the sections. The parent sections open and close fine
but when you click on one of the subsection items and go to the desired
page the menu fails to remain open.
The javascript code is embeded inthe html for reference.
Is this a JS issue I wonder. The original script/code derived from
Alsacreations but there is no documentation to aid this problem.
Thanks in advance for any tips :)
Chris
cedwa wrote:
> I am developing a site at http://www.nwlmi.org....
problems with JavaScriptHi, I need help to JavaScript. I am new to this, and am trying to the
page online ASAP. I
have two submit buttons on one form, and each button will have to do
different things.
I named both button "but1". The first button has the value "Continue",
the second button has
the value "new page". If someone click on the button with the value
"Continue", I need to
check if certain information has been filled in before proceeding, and
if yes, I need to go
to page1.php (which is the second page of the form) and I have to save
the result o...
regex in javascriptHi folks,
I'm trying to learn and understand regex in javascript for web form
validation. In trying to write a piece of script to validate an email
address I came up with the following:
function isEmail(input)
{
var re =/^\w([\.\-]\w)*@\w([\.\-]\w)+$/
if (!re.exec(input))
{
return false
}
}
This is then referred to as :
if (!isEmail(document.form.mailfrom.value))
{
alert("This does not look like an email address")
}
etc.
Unfortunately it bombs on absolutely everything. Can anyone suggest why?
As an aside, is there any trul...
dynamic load javascript from javascripthi,
from here:
http://www.activewidgets.com/javascript.forum.6114.15/dynamic-load-javascript-from-javascript.html
there is a method to load js from js, e.g.
//---------------------------------------------------------------------------------------
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'snip.js';
document.getElementsByTagName('head')[0].appendChild(script);
//---------------------------------------------------------------------------------------
this method works great, but there is a bug(?) when using wit...