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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:14:31+00:00 2026-05-25T11:14:31+00:00

I am having a weird problem in html in both firefox 6 and IE

  • 0

I am having a weird problem in html in both firefox 6 and IE 8

there is this line that is generated in Java Class

<a onclick="updateEventDataDiv('1. some text <br>2. some text <br>', event);" href="javascript:void(0)"> some text </a>

this is a link created dynamically in a Java Class that creates a JavaScript pop up when the link is clicked. The Java code is nothing special it just iterates through a list and concats the values to this HTML code.

The prob is when clicked I get a Javascript error.

Error: unterminated string literal
Source File: http://localhost:18080/xxx/xxx/xxx.htm?actionLink=xxxTable-controlLink&ascending=false&column=raisedAt&page=x
Line: 1, Column: 19
Source Code:
updateEventDataDiv('x value

and the arrow points to single quote just before the x.

The weird thing when I open up the firebug -> inspect element and look at the element, the quotes are pefectly closed AND if I change anything i.e. remove a white space, add a white space, remove quote or do anything on the fly using the firebug and then click the link it WORKS ! I can see the pop up

not just that the same java code in the production server and same HTML page generated works like charm.. no issues at all.. its something in my local dev env…

I am also getting 1 javascripit errors for the same page but neither firefox nor ie tells me any details about it nor the line number

and yes one more thing.. I saved the page and ran it in firefox.. same prob.. then edited.. deleted a white space somewhere in the line and it WORKED and keeps working I do not have to tweak it any more… then why the hell it does not works the way it should

NEED HELP.. have to make this work on my loca dev env !!!

  • 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-25T11:14:32+00:00Added an answer on May 25, 2026 at 11:14 am

    My guess is that string contains a new-line on the server-side – so that when it’s spat out into the DOM it’s treated as unterminated:

    <a onclick="updateEventDataDiv('x value 
    blah', event);" href="javascript:void(0)"> some text </a>
    

    Would need to be

    <a onclick="updateEventDataDiv('x value blah', event);" href="javascript:void(0)"> some text </a>
    

    It’s not invalid HTML but it is invalid javascript.

    So you might need to strip out any newlines in your string server-side.

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

Sidebar

Related Questions

This is a really weird problem that I have been having. When I download
I'm having this weird problem with HtmlUnit in Java. I am using it to
I'm having the weird problem that after having javascript inject some dom-elements the css-rules
I'm having a weird problem with memset, that was something to do with a
I am having a weird problem with sending data back to my server. This
This is a weird problem I have started having recently. My team is developing
I'm having a weird problem with a threaded class using Boost::threads. Here is a
I'm having weird problem with java TimeZone.. Calling TimeZone.getDefault() gives my local time zone,
Having a weird problem. I'm testing an ASP.NET application I wrote that queries SQL
Im having this weird problem with creating Json dynamically.... for some reason this doesnt

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.