Announcement

Collapse
No announcement yet.

need help with code to declare a new variable

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    need help with code to declare a new variable

    I need help with code to declare a new variable "MailFormRefValue".
    When I press the text link <a href="http://www.dinhoj.se/webshop/e-post-kundservice.html">Kundservice</ a> in the product with Ref: 9511984
    shall "MailFormRefValue" be declared with this product's ProductReference 9511984
    I shall use "MailFormRefValue" in an email form text field (<input> tag).
    Attached Files

    #2
    Assuming you're talking about a JavaScript variable and not an Actinic one.
    Code:
    <a href="http://www.dinhoj.se/webshop/e-post-kundservice.html"
      onclick="var MailFormRefValue='<actinic:variable name="ProductID" encoding="perl" selectable="false" />';return true;"
    >
    Kundservice</a>
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Although I'd do it like this (again assuming you want to get the ProductID into that e-post-kundservice.html page).
      Code:
      <a href="http://www.dinhoj.se/webshop/e-post-kundservice.html?<actinic:variable name="ProductID" />" >Kundservice</a>
      And in e-post-kundservice.html do
      Code:
      var productid = location.search.substr(1);
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Originally posted by NormanRouxel View Post
        Although I'd do it like this (again assuming you want to get the ProductID into that e-post-kundservice.html page).
        Code:
        <a href="http://www.dinhoj.se/webshop/e-post-kundservice.html?<actinic:variable name="ProductID" />" >Kundservice</a>
        And in e-post-kundservice.html do
        Code:
        var productid = location.search.substr(1);
        what code should I have in e-post-kundservice.html to get Productid in a text field?

        Comment


          #5
          Document.write the line using the variable mentioned above. Or set the value of your form field. Google for JavaScript tutorials as this is not really an Actinic specific problem.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment

          Working...
          X