• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why is jquery failing to grab the href of a clicked url?  RSS feed

 
Victor Ade
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is how best i can describe what i'm facing now:

  • I have a js code in the head section of my webpage to grab the href of any clicked link  from the page


  • Send the href through ajax to a server side servlet which is saddled with the job of updating the number of times the said url have been clicked in the database.


  • this is how my href looks like


    here's the jquery to grab it


    my servlet code in brief.


  • After sending, open the said link in a new browser window and progress.



  • In my browser Network console,  my POST request to clickCountServlet shows a 200(oK).

    but when i try to print the value of the data sent from js code i discover its null.

    why?
    i'm suspecting the jquery code, it is why i decide to post this here.

    thisss.PNG
    [Thumbnail for thisss.PNG]
    this is what my browser network consle shows
    this2.PNG
    [Thumbnail for this2.PNG]
    netbean console
     
    Victor Ade
    Ranch Hand
    Posts: 47
    • Likes 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Bear Bibeault wrote:As you've got JSF markup in there, this has been moved to the JSF forum.

    Bear Bibeault wrote:As you've got JSF markup in there, this has been moved to the JSF forum.

    Totally understood.  solved the issue a long time ago too. tis  me not specifying a name for the data [and enclosing it in a {}] to be carried to the server. Jquery doc help. Should have gone their first. I'll be careful next time.
    Thanks.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!