trier Posted August 8, 2011 Posted August 8, 2011 Hi, Can anyone please help with an osC 2.3 ‘Buttons’ problem. I believe a ‘stock’ grey button should should display when javascript is disabled. My form submit buttons display as expected, but for links, only the text displays, there no button image. As far as I can judge all coding is as expected:- The tep_draw_button function in includes>modules>html_output.php is unchanged The stylesheet.css tdbLink definition is unchanged - /* buttons */ .tdbLink a { } .tdbLink button { } The generated html code is as expected - <span class="tdbLink"><a id="tdb2" href="http://www.16123.co.uk/login.php">Sign In/Create Account</a></span><script type="text/javascript">$("#tdb2").button({icons:{primary:"ui-icon-person"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script> I have tried defining the class in the <a> tag and also putting the <span></span> immediately around the text within the <a></a> tags, always with the same result. A search shows tdbLink referenced twice in stylesheet and twice in tep_draw_button (similarly in admin) there are no other references. Any help would be appreciated. Many Thanks.
vishalchauhan Posted August 8, 2011 Posted August 8, 2011 why dont you take reference of login.php page? have you tried this one? <?php echo tep_draw_button('Sign In / Create Account', 'triangle-1-e', tep_href_link(FILENAME_LOGIN, '', 'SSL')); ?> Please take backup of your files before do changes suggested by me
trier Posted August 8, 2011 Author Posted August 8, 2011 why dont you take reference of login.php page? have you tried this one? <?php echo tep_draw_button('Sign In / Create Account', 'triangle-1-e', tep_href_link(FILENAME_LOGIN, '', 'SSL')); ?> Vishal, Hi, Thank you for your reply. Your suggestion - {echo tep_draw_button(HEADER_TITLE_LOGIN, 'person', tep_href_link(FILENAME_LOGIN, '', 'SSL'));} is exactly what I have. All other ‘link’ buttons are similarly defined. Form submit buttons, which are correct with javascript enabled/disabled, are defined - <?php echo tep_draw_button(IMAGE_BUTTON_LOGIN, 'key', null); ?> Many Thanks
trier Posted August 9, 2011 Author Posted August 9, 2011 From what I’ve read, I assumed that buttons for links (as in the header bar short cuts) should display as buttons even with javascript disabled, I thought losing the image was a problem with my site. However, running the osC demo site with javascript disabled button links show as a text field without the the image background. Does anyone have any suggestions as to how this can perhaps be improved?
vishalchauhan Posted August 9, 2011 Posted August 9, 2011 you want if javascript is disabled from the browser, still the button should be shown on the page... sorry for bad english.. but have you tried this one tep_image_button($image, $alt = '', $parameters = '') it's call a button from includes/languages/YOURLANGUAGE/images/button so you have to just give image name in place of $image if button is not there then create a button and put it in to the directory i.e. includes/languages/english/images/buttons/ i guess you can understand what i want to say... Please take backup of your files before do changes suggested by me
trier Posted August 10, 2011 Author Posted August 10, 2011 Vishal, Hi, Thank you for your help again. I believe the buttons have to be controlled by the CSS tdbLink class. The class defines the button, when javascript is enabled the class is removed (by javascript in html_output.php) leaving the javascript controlled button. When javascript is disabled the class isn’t removed leaving the CSS defined button. I believe I am now close to a solution, trying to make sure it works with form & link buttons and having no impact when javascript is enabled.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.