How could i call/put value to a new seperate window form field?
for example, the new window form name="formNew", with an input field name="windowNew_input" id="windowNew_input".
On current window, using :
document.formNew.windowNew_input.value = "test";
this ends up with error
My attachEvent calls a character count function on key up and key down. It slows down IE dramatically, with using up 100% of my cpu.
Does anyone know how could i get over this?
Thanks!
How do i get the different string after compare
1. string1 = this-is-a-test
2. string2 =this-is-a-test-numberOne
how to compare those strings and get the string "numberOne" as the result?
Thanks very much for your help!
I have the string $orig. Could someone help me to remove all the brackets and strings inside the brackets? The result will look like $final.
$orig = "text1<something>text2<others>text3";
$final = "text1text2text3";
Thanks very much!
Trying to call a function on the created link. But the alert only shows when click on the Top Level.
Here is my js:
<script>
var theUL, theLi, theA;
function test() {
mystart = document.getElementById('testdiv');
for (var i=0; i<4; i++) {
theLi =...
By php, how to strip a html tag which has an id relates to it?
For example,
<div id="test" class="test"><p>Here is the content</p></div>
The end results will only have:
<p>Here is the content</p>
Thanks!
How could i strip the html tag which relates to an ID.
For example:
<div id="testid" class="test"><p>This is the body</p></div>
How to strip the pair of <div> tag, that results only contains: <p>This is the body</p>
Thanks!
How can i grab the hidden input innerHTML value in php?
HTML:
<input type="hidden" name="temp" id="temp" value="<?=$a?>" />
PHP:
tried
1. print("<script language = 'javascript'>document.write(parent.outer_form.temp.innerHtml)</script>");
2. print("<script language =...
I am trying to use the ID through the loop, but error:
document.getElementById(firstN)has no properties
count = 5; //5 is set up temporary
for (i=0; i<5; i++) {
firstN = 'firstN'+i;
firstN = 'secondN'+i;
document.getElementById(firstN).innerHTML =...
If i call the tableID in the following js code in a loop since the total table number is dynamic, it gives error: document.getElementById(tableID).rows has no properties.
In the html code, there is matching table1, table2, table3.... if i hardcode it, it works. But i need to put it in a loop...
How to get both text link and url link works in regular expression?
Used
$text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\">\\0</a>", $text);
It works fine for the url link, but breaks the text link.
Wondering if javascript could open an url at a specific location on a page.
if ( test == "a") {
document.write("Below is the page");
//here will be the page that 1st url referred to
} else {
document.write("Here is another page");
//here will be the page that 2nd url referred to
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.