Regex Help Needed

May 18, 2007

I need to strip everything from a file except what is between <body>
and </body>

View 2 Replies


ADVERTISEMENT

Href Help Needed

Jul 23, 2005

Can someone help me on this little problem. I am using the following
code in an xsl page.

The directed page is written in the javascript: submitOnClick();

<a href="#">
<xsl:attribute name="onClick">submitOnClick();</xsl:attribute>
Main Menu
</a>

The problem is that when href is given the # sign, the moment i click
on the link it first jumps to the top of the page, before moving to
the directed page.

This can be seen when the page is longer than the screen size.

Is there any other solution to rectify that problem ..........

View 1 Replies View Related

If / Then / Else Help Needed - More Then One Condition Possible?

Sep 19, 2006

I want to write an if / then statement and have tried using this:

var MyVarMailto;
if (Request.Form("LoanRequest") == "Under $250,000") {
if (Request.Form("Organization") == "1") {
MyVarMailto = "emailA@address.com";
}
}
else if (Request.Form("LoanRequest") == "Over $250,000") {
if (Request.Form("Organization") == "1") {
MyVarMailto = "emailB@address.com";
}
}
else {
MyVarMailto = "emailC@address.com";
}

So basically I have a form that gets filled out and submitted which
passes the values to this page. I want to check the values against
conditions that you can probably figure out above and then set the
variable contigent to those values. I tried using AND after the first
condition but that doesn't do anything.

View 14 Replies View Related

Tab Function Needed

Jul 20, 2005

Has anyone developed a function that can determine the width of a text
string using a proportional font? I would like to do this in order to
insert a variable number of spaces after the text to simulate a tab. Code:

View 5 Replies View Related

Form Action Help Needed...

Jul 20, 2005

I have a form with a name, and action, a post method.

In rare occasion I want the form action to be different to the default
action, so I do this: document.formName.action = "newURL";

This works fine under Mozilla, but does not work under IE5, 5.5 or 6,
it says: Object doesn't support this property or method.

Does anyone know what could be wrong?

View 2 Replies View Related

Allow More Rows To Be Added As Needed

Jul 29, 2009

I have a php form that submits to a database which is all fine, a portion of the form allows for more rows to be added as needed but for some reason it only allows for upto 9 rows to be submitted then it just loops back through the first 9 and i have no idea why.

[Code]....

View 7 Replies View Related

Info Needed On Using JS To Manipulate CSS

Apr 24, 2004

I'm starting to focus my attention on using javascript more (initially in conjunction with css) and would like to know which version of JavaScript introduced functions such as getElementByID() and such. Recommendations for good books/sites would also be appreciated. I also would like to hear where I can find good tutorials and examples of using JS to interact with CSS. One thing I am playing on playing with is using CSS/JS with forms to help users fill in required info. Hoping to make it even more obvious the famous little red asterisks by each form field.

View 6 Replies View Related

IE Blocking Needed Content!

Jan 28, 2005

I am working on a website that utilizes a DHTML (HTML + Javascript) Navigation bar, but IE blocks the "ActiveX" content, despite the fact I am just using javascript. This site will be used by every computer on our network.

Is there any way I can modify the script so that it is not blocked even when this "security feature" enabled?

View 4 Replies View Related

IE To Netscape Event Assistance Needed

Jul 23, 2005

Does the world need another DHTML popup calendar? Probably not, but I'm writing one anyway. It's unique in that it allows drag selection of a range of dates. Works great on IE6 but I'm having some trouble with Netscape and events. In particular, the mousedown event doesn't work. The event fires, but I can't seem to get a handle on what html element was clicked.

View 4 Replies View Related

Basic Help Needed To Hiding And Showing Div

Jul 23, 2005

In a nutshell, I'd like to have a list of items, each of which fills out a
small table which displays some info about a particular item(the items being
a trouble ticket for a tech support ASP-built web-based app). There may be
zero, one, or many of these per ticket. Since some tickets have many of
these items (call them work items), the page can get awful long. I have this
part working already.

So my proposed solution to make the pages shorter would be to have one line
for each of these little work items. If you click the text in that one line,
it shows what had been a hidden div. If you click it again, it hides it.

See below:

View 5 Replies View Related

Help Needed With Event Testing Script

Jul 23, 2005

I'm trying to check for this bug with the following script and it
*seems* to work. In IE it reports "bubbling" and in Firefox "not
bubbling" but I really have no direct way to confirm the Firefox
results until the bubbling bug is fixed.

Basically the test script assigns an onscroll event handler to a
textarea and then scrolls the textarea down then back up, checking to
see if a the event handler works (assigns the "bubbling" variable a
"true").

I had to code things with a few settimeouts otherwise Firefox, unlike
IE, wouldn't display the down then back up scrolling of the textarea.
Which may have been a problem.

Lacking a "debugged" Firefox browser, is there some further (indirect?)
tests and/or rational that would support or discredit this script as a
valid onscroll event check? ....

View 5 Replies View Related

Ascertain Needed Div Height To Fit Content?

Jun 24, 2006

I have a javascript that manipulates the DOM with content that will be
of variable heights. How can I ascertain how high my div needs to be in
order to show all content without scroll bars. Rather than just having
this happen automatically, I want the div to expand with a DHTML
animation. So, I need to know where to tell the script to stop
expanding. In pseudo-code:

function divAni(){
if(this.height > 0){
if(this.height > 0){
this.height = this.height - increment;
}
setTimeout(divAni,delay)
} else {
if(this.height < this.height.needed){
this.height = this.height + increment
}
setTimeout(divAni,delay);
}
}

I'm just not sure how to ascertain how tall the div needs to be for the
content to display.

View 4 Replies View Related

Code Needed For Horizontal Scroller?

May 5, 2011

I need a JavaScript code so that I can achieve the functionality like the attached image. There will be horizontal scroller with left, right arrow for image scrolling. If a user will click on any image then that that image will be opened above the scrolling bar.

View 1 Replies View Related

JQuery :: Version Needed For Paging Tabs?

Dec 15, 2011

I'm working for a company that is using version 1.4.4. But Ive acquired the need to paging tabs.In the example though, It uses 1.3.2. Is this the only version of the library that i can use. or can I use my existing library?

View 1 Replies View Related

Iframe Scrolling - Scroll Bars Automatically Appear When Needed Or Put Them There Permanently

Aug 13, 2009

I know that iframes can be set to have scroll bars automatically apear when needed or put them there permanantly. However, I would like to have a Javascript slider on the topmost page scroll the iframe. It was possible to make a link on the topmost page change the content of the iframe by putting the iframe name in the link's target. Is this possible with a slider? I ask this because some of the content inside the iframe is on external pages so obviously we can't add the scroll bar there.

View 11 Replies View Related

Write A Script That Adds An Extra Field To A Form When Needed

Feb 11, 2010

I have been trying to write a script that allows a user to click on a button like a plus sign to add an additional field for a phone number when they have more than one phone number to enter. I have created a script that sort of does this. It doubles up what is already there, so, the first time, everything is fine, but after that I get a lot more fields than I want. I am a php programmer and not familiar enough with javascript to get to what I want. My script is included below. What I am doing here is retrieving the html content and then adding it to what is already there. In php I would use an if conditional test to see if the data has been retrieved.

The first time it would retrieve the data into a variable. After that it would not retrieve it. I think I am getting into some scope and sequence issues here. Javascript is a bit different than php in these regards. Also there is a commented line in the code that asks another question about the use of variables that I don't understand. I also tried using appendChild() here to no avail. I couldn't get that to work at all.

[Code]...

View 3 Replies View Related

Form Validation Code Needed To Make Sure Radio Button Is Selected

Apr 7, 2010

Does anybody know how i check to see if the radio button is select and also can anybody tell me how i can check for an email in the correct format the function isValidEmail in the above alows emails to pass through.

View 4 Replies View Related

JQuery :: Beta Testers Needed For Form Plugin File Upload Support

Mar 22, 2007

I've added file upload support to the form plugin and I could use some help testing it out.If this feature interests you then go ahead and grab the beta plugin at:URL...File upload support is baked right into the plugin and there are no external dependencies.The plugin will automatically detect file input elements and use an iframe to submit the form if there are files to be uploaded.No extra coding or metadata is needed to take advantage of this new feature.In addition, even though an iframe is used instead of the XHR object, callbacks and global triggers still work as expected (so any code that you have in place to display activity indicators or blocking elements will still work).However, there are some challenges when using iframes in this manner.For one, it is quite difficult to determine if the submit operation succeeded or failed.The iframe becomes the target of the submit operation and so that is where the server response is written.The form plugin does its best to determine the data type (html, xml, etc),but the status is always 'success' unless an exception is caught during the type determination.URL...

If you use this page for testing *please* be kind to my server and only upload small files! I'd really prefer that you download the plugin and integrate it into your own test environment if possible.I've done some testing on FF, IE and Opera and the results are encouraging. I don't have access to Safari so I'm sure there are issues lurking for that platform.If you're interested in the code you can find it all tucked into the end of the ajaxSubmit method in a function called "fileUpload".

View 24 Replies View Related

Date Of Birth Validation Function Needed To Add To Existing Function

Mar 24, 2006

I have a function I call to see if people leave form fields empty. I have been asked by a client to check to make sure of the person's date of birth as well. They gave me the script, however, I am unsure how to do implement it. How do I add this to my existing checks? Code:

View 2 Replies View Related

RegEx In Javascript

Jul 23, 2005

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 solve this problem as I should be able to put any
alplanumeric value into the password, including space.

View 6 Replies View Related

RegEx In Javascript?

Jul 23, 2005

I have a variable named "acct". I first want to remove any "-" characters
from it's value. After this I want to verify that we have only exactly 12
digits in the variable.

Unfortunately I'm pretty green as far as using RegEx.

/d{12}/.test(acct); should do the second part, but how do I do the first?

View 4 Replies View Related

Issues Getting And Regex'ing A Url

Jan 9, 2006

Basically i want to get the current url, and then replace http:// with
something else.

Here is the current code.

var current_url = window.document.location;
var re = new RegExp("http://", "g");
if(re.test(current_url)) {

me = current_url.replace(re,"http://www.addme.com/");

window.alert("found :: " + me + " :: " + current_url);
} else {
window.alert("not");}

if my page was http://ww.google.com 'd get the alert to be:

found :: undefined :: http://www.google.com.

I dont understand why i am getting undefined. When re.test() works.
surely that means the regex is correct.

View 14 Replies View Related

RegEx Question

Jun 15, 2006

Trying to match the entire following object literal code using a RegEx.
var Punctuators = { '{' : 'LeftCurly', '}' : 'RightCurly' }

Variations on the idea of using /var.*{.*}/ of course stops at the
first }.

View 7 Replies View Related

Space In REGEX In IE6

May 9, 2007

I was using the following code:

element.value = element.value.replace(/ /g,'');

to remove all the spaces in a string.

However in IE6 it complained with and "Expected ')'" error.

How can I tell IE6 to replace just spaces (i.e. not using s)?

I tried / / and /[ ]/ but neither of them worked either.

View 13 Replies View Related

Regex Not Working In IE7 And 6?

Oct 13, 2009

ok heres a regex

/^(?=.*d)(?=.*[A-Z])(?=.*[a-z]).{8,16}$/

which checks I have at least one lowercase letter, one uppercase letter and one number and the string is between 8 and 16 characters.I have adapted this from another source and it works as intended on all browsers but not IE7 or IE6 (oh microsoft why do you make my life so hard)This works fine in all other browsers (IE8 is fine) but doesnt work in IE6 or IE7

View 1 Replies View Related

Divisions And Regex

Oct 23, 2005

I'm writing an ECMAScript tokeniser and parser and trying to find out if I can eliminate the switching from tokenising "/" as start of regex or the division operator depending on the parser feedback - essentially, if I can make the tokeniser independent of the parser. (I have a gut feeling this needs too much special casing to be worth it). Code:

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved