![]() | |
| |||||||
| Home | Register | Blogs | FAQ | Members List | Calendar | Downloads | Arcade | Mark Forums Read |
| Web Development Java/PHP/Perl/ASP and more |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 |
| Web developer | JavaScript: Link with confirmation in frame I have 2 frames, and I have a link in 2nd frame. I want to put a confirmation on that link for page redirection. The code is the following: <a href="javascript:;" onclick="javascript:if(confirm('Are you sure you want to delete this item?')) self.location.href='new.asp'; else return (false)">link</a> It's not working. I tried to replace self.location.href with parent.location.href - working parent.frames[0].location.href - working parent.frames[1].location.href = self.location.href (current document) - not working |
| | |
| | #2 |
| Web developer | Т.к. спец-ов по javascript как оказалос' не очень то и много, то сам отвечаю на свой же вопрос, для тех кому интересно. <a href="new.html" target="frame2_name" onclick="return confirm('Are you sure you want to delete this item?')">link</a> |
| | |