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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:01:20+00:00 2026-05-27T01:01:20+00:00

I’m rephrasing my entire question which previously sounded absurd with this one which is

  • 0

I’m rephrasing my entire question which previously sounded absurd with this one which is a bit more rational.
I’m implementing a bookmarklet (tutorials from this link http://net.tutsplus.com/tutorials/javascript-ajax/create-bookmarklets-the-right-way/ ) a bit similar to the bitly sidebar Refer the link: http://bitly.com/pages/sidebar
Once the user has added the bookmarklet to the fav/bookmarks bar, when user clicks on the bookmarklet my popup opens up with a variety of fields for the user to add..currently doing this in my local machine with static html markup. I haven’t included the css necessary for the pop up currently but will implement it shortly.
But am facing quite a few challenges:
Here’s my code:
Bookmarklet

<a href='javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.3.2",function($,L){alert("div is not hidden");var content_script = $("<script></script>").attr("src","bookmarklet_content.js").attr("type","text/javascript").attr("language","Javascript");$("head").append(content_script);});'>Edit</a>

JS file included through bookmarklet

var html_content = '';
var isUserSignedIn = 1;
if(isUserSignedIn) {
  html_content = 'markup for my popup div';
  $('body').append(html_content);
  if($("#tbarAddtoBrfPopup")) {
    alert('element identified');
  } else {
 alert('failed to identify');
 }
$("#divname").find(".pagename_parent").find(".pagetitletextfield").val(document.title);
var success_popup = 'another huge bunch of markup';
$('body').append(success_popup);
}
else {
  html_content = 'another pop up for signing in';
  $(html_content).insertAfter($('body'));
}
$("#popup1_submit_button").live('click',function(){
  $("#current_popup").hide();
  $("#Success_p0\opup").show();
});
// close buttons in my popup
$(".close").live('click',function(){
  $(this).parent().parent().hide();
});

I’m already feeling the heat with escaping stuff in the markup to prevent not well-formed error( which took me an hour to find and fix), and some special characters like a ‘x’ for close which is displayed in a funny ascii art style. Even now i get a syntax error for line var html_content=”; which i’m clueless about.

Kindly let me know if there’s a better procedure to fetch html and js from an external file and display without issues.

Also this popup works fine for local pages in my machine… when i use the bookmarklet for any public page it appears that the external js is not loaded at all. Seems I’m missing something here.
Edit guess its because of calling my js file w.r.t its relative path.

Any sort of help or suggestions(except that I should quit coding) would be great.
Thanks!!

  • 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-27T01:01:21+00:00Added an answer on May 27, 2026 at 1:01 am

    I decided to follow the bitly implementation of using an iframe which seemed to be the best possible option to prevent the css and js mashup and mess up issues…

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.
In my XML file chapters tag has more chapter tag.i need to display chapters

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.