Announcement

Collapse
No announcement yet.

Javascript write to NETQUOTEVAR?

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

    Javascript write to NETQUOTEVAR?

    Hi,
    I am a bit of a newbie with javascript; is it possible to write variable data to a NETQUOTEVAR field dynamically; i.e. via an onclick action on a button say? If anyone knows, thanks in advance.



    sk247

    #2
    NETQUOTEVARs aren't variables as such, they're really just placeholders for Actinic to swap in template contents etc. They don't exist once the files are uploaded to the server, so Javascript can't interact with the NETQUOTEVAR fields in any way, only the values that are inserted by Actinic.

    What is it that you're trying to achieve?
    www.gbradley.co.uk
    Web Development, Actinic Patches, Scripts & more

    Comment


      #3
      I am trying to write data, a text string held in a variable; to the other info question field for a product? Very Confused??

      sk247

      Comment


        #4
        This code in your product template will pre-set the Other Info field.

        Code:
        <script type="text/javascript">
        <!--
          var ref = unescape(('NETQUOTEVAR:PRODUCTANCHOR'.substring(1)).replace(/_/g,'%'));
          var mytext = 'wowza';
          document.getElementById('O_' + ref) = mytext;
        //-->
        </script>
        The code must be placed in the Template somewhere after NETQUOTEVAR:OTHERINFOPROMPT

        It's hideously complicated because there's no easy way of getting the internal product reference for Duplicates.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Norman,

          Thanks for the reply, today is the first opportunity I have had to implement the code you kindly forwarded, though it is not updating the other info box field? I have followed your instructions; placing after NETQUOTEVAR:OTHERINFOPROMPT, still no result. I should have explained though that I only require to fill 1 other info prompt; the site store has only 1 product to sell; just lots of attributes associated to it; so I need really to only write once! Any further help greatly appreciated.

          Thnakms
          sk247

          Comment


            #6
            Ignore last request, just discovered error, missed of the ".value"

            Thanks


            Comment

            Working...
            X