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 6376639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:46:15+00:00 2026-05-25T01:46:15+00:00

When a user enters a bookmark using form[‘f3’] (a url and a title) it

  • 0

When a user enters a bookmark using form[‘f3’] (a url and a title) it is immediately entered in via the dom – visually the title and the favicon are seen by the user. Each bookmark is a link and and image under div Bb1c. The insert is done alphabetically. Basically, I need to insert the new image and link after the previous one.

The loop portion was created before I had added in favicons so it loops through all the child elements, but it only needs to loop through the tags. How do I check to make sure that it is an element of type a before doing a compare? My for loop needs an && added to it.

This is rough draft code so if there anything else – contstructive criticism

  var a=document.getElementById('Bb1c'),
  b=document.createElement('a'), 
  e=document.createElement('img');
  c=document.forms['f3'].elements,
  d=a.firstChild,
  b.innerHTML=c[1].value; 
  b.href=c[2].value;
  b.name="a1";
  b.className="b";
  e.src=b.hostname + '/favicon.ico'; 
  e.onerror=function()  
    { 
    e.src = 'http://www.archemarks.com/favicon.ico'; 
    }
  while(d=d.nextSibling) 
    {
    if(b.innerHTML<d.innerHTML) 
      {    
      break;  
      }
    }
    a.insertBefore(b,d);
    return 1;
  }
  • 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-25T01:46:16+00:00Added an answer on May 25, 2026 at 1:46 am

    You want the tagName (or nodeName) property.:

    if(ele.id === "foo" && ele.tagName.toLowerCase() === "span") {
        // do something
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The user enters a product code, price and name using a form. The script
I would like to intercept any URL which the user enters in their browser
When a user enters a web url in a comment, that url becomes a
when the user enters text in a uitextview I would that the title of
I have a data entry form where user enters lots of data. When user
I have form fields where the user enters in: percents: 50.5% money: $144.99 dates:
I have a form where the user enters a 6 digit number and clicks
I have a form where the user enters data. Then, when they click submit,
Right now I have a form where user enters the info. It is than
If user enters a URL, as soon as they have completed the URL and

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.