Hi,
I am using HTML,Javascript . I m trying to specify source path for a dynamically created element.But its not displaying the image.Please help me.
I m using the following code:
[CODE=javascript]var row1td7=documen t.createElement ('TD');
var row1td7btn=docu ment.createElem ent('input');
row1td7btn.setA ttribute('type' ,'image','id',' Del'+i);
row1td7btn.src= "test image\del.jpeg" ;...
User Profile
Collapse
-
Specifying image source dynamically
-
Hi
Thanks a lot .. Its working perfectly.
Regards
daitasri... -
Hi
I used the following code ,which trims any number of leading and trailing spaces. I also want to know how to restrict the number of spaces between two words to one.For example :
It should allow strings like "A bc" but not something like "A bc" or "A bc". Please help me on this.It shud not allow two or more spaces between the two words.
[CODE=javascript] function trim(str)...Leave a comment:
-
I used the following code :
[CODE=javascript]function refresh_page() {
window.location .href = window.location .href + '?' + (+ new Date);
}[/CODE]
Thanks
daitasri...Leave a comment:
-
Check textboxes for empty string
Hi
I m using javascript in HTML. I want to know how to validate the text entered in a textbox (for empty strings). My requirement is that my code should not allow empty text (not even spaces -trailing n leading). I have used some code which is checking only wen v do not enter any text. But its not validating when v enter some number of blank spaces.Please help .
Thanks
daitasri -
Hi
Thank you very much for your valuable help. It is working. Now i dont have any caching problem. :)
Thanks
diatasriLeave a comment:
-
Refresh page onclick of button
Hi,
I m using javascript in HTML Page.And i want to refresh the page onclick of a button.I Tried with history.go(0) ;
Its working fine but wil it cause any caching? I want to know some better way of refreshing ,because my html page is behaving very differently.
Thanks
daitasri -
OnChange event for dynamic textbox
Hi
I m creating a textbox dynamically on click of a button. I want to attach an onChange event for that textbox.I tried using following code but it does not seem to work.Can anyone suggest a better way to solve my problem. The code i am using is as follows:
[CODE=javascript] var cell1 = row.insertCell( 0);
var addRowTextNode1 = document.create Element('input' );
addRowTextNode1 .setAttribute(' type','text','n ame','UI'+iIter ation,'id','UI' +iIteration);... -
Hi
Thank you for your sparing valuble in helping me. I tried using this ,its fine but i m creating a dropdown also after creating the textbox.Now after i include this statement
node.className= 'class';
its just creating a textbox and after that its not creating the dropdowns. Its showing error there. Please help me with this.
Thanks
DaitasriLeave a comment:
-
Applying CSS styles to dynamic texbox
Hi
I am creating a textbox dynamically on click of a button. I want to apply some styles to that textbox using a CSS file. How can i do that using javascript in a HTML page? The following is the code i am using .
[CODE=javascript]
var cell2 = row.insertCell( 1);
var addRowTextNode2 = document.create Element('input' );
addRowTextNode2 .type = 'text';
addRowTextNode2 .name = 'CN'+iIteration ;... -
Thanks a lot. This is able to get all the values of both textboxes and dropdowns. And now i am able to store all the values ....Leave a comment:
-
Thank You very much .Its working fine. I am able to store all the values. :)...Leave a comment:
-
Hi
Thanks for your help.I tried that but it shows as 'undefined'. I m sending u the whole code which i am using.Please tell me wat is wrong in that or how can i modify to achieve my requirement.
[HTML]<html>
<head>
<script language="javas cript">
function createTable(id, ctr)
{
var tbody = document.getEle mentById(id).ge tElementsByTagN ame("TBODY")[0];...Leave a comment:
-
I tried using textboxname.val ue also but it shows error. I named the textboxes as "text"+i where 'i' is getting incremented in a loop. I want to access the data entered in that textbox, using a javascript function and i want to store those values in some variables but not able to do.Request you to help on this.
ThanksLeave a comment:
-
Can u please send some examples of how to access the textboxes and data entered in textbox? I m not using AJAX. I need to do in javascript only. Please help me on this.Leave a comment:
-
Hi
The user types something in those textboxes and then clicks on "save" button then i need to save them into variables and also in database.I am using SQL Server as database.
Regards...Leave a comment:
-
Hi ,
This is the code i m using
[CODE=javascript]function addRowToTable()
{
var tbl = document.getEle mentById('t1hea d');
var lastRow = tbl.rows.length ;
// if there's no header row in the table, then iteration = lastRow + 1
var iteration = lastRow;
var row = tbl.insertRow(l astRow);
// left cell
var cell1 = row.insertCell( 0);
var textNode...Leave a comment:
-
Dynamic table with dropdown and textboxes
Hi
I am using HTML and JS only.
When i click on Button(say Add) a new row will be added in to the table with dropdown's and textboxes.I want to know how to access the data entered in the textboxes and dropdowns
Please help me out as i am a beginner
No activity results to display
Show More
Leave a comment: