JF0
asked on
Create ASP variable from text on page?
Hello,
I am not very good at scripting. Searched but could not find exactly what I needed. Hopefully one of you experts will be able to assist me.
I have a web page where I have defined editable sections for my customer through a hosted CMS. The CMS allows the user to edit data so long as a specific CSS class is applied to it. An editable section looks something like this:
My users will update the Email Address between the paragraph tags. So far so good. But, I also want to make the Email Address a link. So now I have something like this:
So my question is, how am I able to grab the email address from between the paragraph tags and place it in the link before it? It shows xxxx in the link where i need the email address to be.
Thank you in advance.
I am not very good at scripting. Searched but could not find exactly what I needed. Hopefully one of you experts will be able to assist me.
I have a web page where I have defined editable sections for my customer through a hosted CMS. The CMS allows the user to edit data so long as a specific CSS class is applied to it. An editable section looks something like this:
<p class="editable>EmailAddress@123.com</p>
My users will update the Email Address between the paragraph tags. So far so good. But, I also want to make the Email Address a link. So now I have something like this:
<p class="editable><a href="mailto:xxxxx">EmailAddress@123.com</a></p>
So my question is, how am I able to grab the email address from between the paragraph tags and place it in the link before it? It shows xxxx in the link where i need the email address to be.
Thank you in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the answers.
pateljitu, this script does work, however, i was hoping to write the variable to the link instead of having it generated only onclick.
pateljitu, this script does work, however, i was hoping to write the variable to the link instead of having it generated only onclick.
Open in new window