SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Apr 2008
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    getting a value knowing just the label

    Hi to all,
    is there a way to reference an object starting from the label to which the object is linked ? Look at the example below :
    I have a page in which two fields are present

    Name: John
    Surname: Smith

    I'd like to access the object that contains the value "John" using in input the value "Name". The two values are in the same row.
    Thanks in advance
    Alessandro

  2. #2
    Senior Member
    Join Date
    Jan 2006
    Location
    Bengaluru
    Posts
    494
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: getting a value knowing just the label

    Hi Alessandro,

    If I understood your problem well, You want to verify/retreive the value of 'Name' or 'Surname'. right?

    Find the ElementID of the 'Name' field, fine the ElementID of the value ('John') field and find the difference. Usually, the difference will be 2 or 3.

    <font class="small">Code:</font><hr /><pre>
    Example:

    Assuming your application is web application and the controls are HTMLLabels

    'get ElementID of the Name field
    iLabelEleId = HTMLLabel("Name=Name:").ElementID

    'retreive the value
    sValue = HTMLLabel("ElementID=" &amp; iLabelEleId + X).Text
    'here X is the difference of ElementIDs.
    </pre><hr />
    Suraj

  3. #3
    Member
    Join Date
    Apr 2008
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: getting a value knowing just the label

    Thank you very much , this is really what I was looking for!

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.11%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:01 PM.

Copyright BetaSoft Inc.