Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1023251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:35:17+00:00 2026-05-16T11:35:17+00:00

When I switch this: <div class=zoom> <a href=javascript:zoomImage(); class=btn-zoom>view larger image</a> </div> to this:

  • 0

When I switch this:

<div class="zoom">
<a href="javascript:zoomImage();" class="btn-zoom">view larger image</a>
</div>

to this:

<div class="zoom">
<a href="/zoomimg.jpg" onclick="zoomImage()" class="btn-zoom">view larger image</a>
</div>

I get an error that the zoomImage() function couldn’t be found.

Here’s an example page: http://www.avaline.com/102

The function is defined near the end of the page, but I didn’t click on the link until after the page loaded.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:35:18+00:00Added an answer on May 16, 2026 at 11:35 am

    You should be attaching event handlers to events in code. Using in-line javascript (javascript within HTML tags) is generally not recommended.

    Take a look at this article, particularly “The Really Unobtrusive Way”:

    http://www.onlinetools.org/articles/unobtrusivejavascript/chapter4.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This code attempts to dynamically switch the class of the StateContainer div from StateOne
I have this basic HTML structure: <fieldset> <input/> <label></label> <div class=toggle_box> <div class=switch></div> </div>
I'm trying to implement a switch case statement like this: switch (active.attr('class')){ case video:
for($i=0; $i<5; $i++) { switch($i) { case 0: echo <div class=\darkgrey topdarkgrey\>; break; case
I have a switch case like this switch($filesize_in_bytes){ case 10Mb <= $filesize_in_bytes <= 100Mb:
In PHP I'd like to do this: switch (function_foo($bar,$bar2)) { case $fu: *Do Stuff*
load.js: jQuery(document).ready(function($) { $('.dialog ul li').click(function(e) { switch($(this).attr('id')) { case 'addProject': $('.addDialog').load('/add/addprojectform'); break; case
I have a Jekyll blog, I am trying to switch from this {:lang='bash'} #!/bin/sh
I have a switch statement similar to this one: switch (number) { case 1:
How would you do this PHP switch statement? Also note that these are much

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.