User Profile

Collapse

Profile Sidebar

Collapse
daitasri
daitasri
Last Activity: May 30 '08, 12:30 PM
Joined: Feb 18 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • daitasri
    started a topic Specifying image source dynamically

    Specifying image source dynamically

    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" ;...
    See more | Go to post
    Last edited by acoder; Mar 20 '08, 11:49 AM. Reason: Added code tags

  • daitasri
    replied to Check textboxes for empty string
    Hi
    Thanks a lot .. Its working perfectly.
    Regards
    daitasri...
    See more | Go to post

    Leave a comment:


  • daitasri
    replied to Check textboxes for empty string
    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)...
    See more | Go to post
    Last edited by daitasri; Mar 17 '08, 06:09 AM. Reason: small change

    Leave a comment:


  • daitasri
    replied to Refresh page onclick of button
    I used the following code :
    [CODE=javascript]function refresh_page() {
    window.location .href = window.location .href + '?' + (+ new Date);
    }[/CODE]


    Thanks
    daitasri...
    See more | Go to post

    Leave a comment:


  • daitasri
    started a topic Check textboxes for empty string

    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
    See more | Go to post

  • daitasri
    replied to Refresh page onclick of button
    Hi
    Thank you very much for your valuable help. It is working. Now i dont have any caching problem. :)

    Thanks
    diatasri
    See more | Go to post
    Last edited by daitasri; Mar 14 '08, 04:19 AM. Reason: wrong reply

    Leave a comment:


  • daitasri
    started a topic Refresh page onclick of button

    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
    See more | Go to post

  • daitasri
    started a topic OnChange event for dynamic textbox

    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);...
    See more | Go to post
    Last edited by gits; Mar 4 '08, 04:04 PM. Reason: added code tags

  • 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
    Daitasri
    See more | Go to post

    Leave a comment:


  • daitasri
    started a topic Applying CSS styles to dynamic texbox

    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 ;...
    See more | Go to post
    Last edited by gits; Mar 3 '08, 09:57 AM. Reason: added code tags

  • 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 ....
    See more | Go to post

    Leave a comment:


  • Thank You very much .Its working fine. I am able to store all the values. :)...
    See more | Go to post

    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];...
    See more | Go to post
    Last edited by gits; Feb 19 '08, 12:29 PM. Reason: added code tags

    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.

    Thanks
    See more | Go to post

    Leave 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.
    See more | Go to post

    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...
    See more | Go to post

    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...
    See more | Go to post
    Last edited by gits; Feb 19 '08, 08:11 AM. Reason: added code tags

    Leave a comment:


  • daitasri
    started a topic Dynamic table with dropdown and textboxes

    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
    See more | Go to post
No activity results to display
Show More
Working...