Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2008
    Posts
    16
    Plugin Contributions
    0

    Default onfocus in sideboxes

    Hello,

    I want to make new sidebox with following code:

    <input type="text" id="SKK" name="SKK" value="" onfocus="selectcur('SKK');" onkeyup="stlac('inter')">&nbsp;<b>SKK =</b>

    <input type="text" id="EUR" name="EUR" value="" onfocus="selectcur('EUR');" onkeyup="stlac('inter')">&nbsp;<b>EUR</b>

    But it doesn't work, probabbly because the ' character. Please can you help me how to add this code to my sidebox?

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: onfocus in sideboxes

    Are you trying to change the currency?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Jul 2008
    Posts
    16
    Plugin Contributions
    0

    Default Re: onfocus in sideboxes

    No, I am just trying to add this inputs to the blank sidebox.

  4. #4
    Join Date
    Jul 2005
    Posts
    537
    Plugin Contributions
    0

    Default Re: onfocus in sideboxes

    /includes/templates/your_template/sideboxes/tpl_currencies.php

    this line is what you'll need to change to whatever suits you:
    Code:
        $content .= zen_draw_pull_down_menu('currency', $currencies_array, $_SESSION['currency'], 'onchange="this.form.submit();"') . $hidden_get_variables . zen_hide_session_id();

  5. #5
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: onfocus in sideboxes

    Quote Originally Posted by DavidVitazka View Post
    Hello,

    I want to make new sidebox with following code:

    <input type="text" id="SKK" name="SKK" value="" onfocus="selectcur('SKK');" onkeyup="stlac('inter')">&nbsp;<b>SKK =</b>

    <input type="text" id="EUR" name="EUR" value="" onfocus="selectcur('EUR');" onkeyup="stlac('inter')">&nbsp;<b>EUR</b>

    But it doesn't work, probabbly because the ' character. Please can you help me how to add this code to my sidebox?
    You are correct about the problem being with the single quotes; they must be escaped with a backslash.


    <input type="text" id="EUR" name="EUR" value="" onfocus="selectcur(\'EUR\');"
    onkeyup="stlac(\'inter\')" />&nbsp;<b>EUR</b>

    Also note the proper closing /> for the INPUT tag.

  6. #6
    Join Date
    Jul 2008
    Posts
    16
    Plugin Contributions
    0

    Default Re: onfocus in sideboxes

    Great Rob, thanks. :-)

 

 

Similar Threads

  1. Replies: 6
    Last Post: 7 Mar 2013, 04:36 PM
  2. Where to use onfocus()
    By ckosloff in forum General Questions
    Replies: 0
    Last Post: 14 Aug 2008, 04:37 PM
  3. Sideboxes/information + Sideboxes/more_information
    By gsh in forum Basic Configuration
    Replies: 1
    Last Post: 16 Oct 2007, 08:04 PM
  4. add an onfocus to radio button attributes
    By jake74 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 6 Jul 2007, 05:28 AM
  5. Left column sideboxes vs. middle column sideboxes
    By aladambama in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Sep 2006, 07:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg