Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

origin of the page  RSS feed

 
andy nan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two HTML pages A.html with add Button and B.html with add button.
when the add button is clicked from A.html or B.html ,c.html is displayed.
I would like to know from Which html page c.html has been called.
I mean to say 'the origin of c.html"
please help
Anand
 
sunitha reghu
Ranch Hand
Posts: 937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can have a hidden variable in each page .
Page a.html with value a and page b with value b.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use document.referer
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!