You need to sign in to do that
Don't have an account?
dreamreal
Why doesn't this simple page with javascript work in salesforce?
I am trying to create a page that will open several links in new windows. I've tried several methods which dont work and am now beginning to think that salesforce does not allow the opening of new pages. For example:
<apex:page standardcontroller="Account" extensions="maininvoice"> <body> <p id="hello">Hello World</p> <a href="http://www.google.com" class="name">google</a> <a href="http://www.yahoo.com" class="name">yahoo</a> </body> <apex:includeScript value="{!URLFOR($Resource.jquery, 'js/jquery-1.4.2.min.js')}"/> <script type="text/javascript"> var j$ = jQuery.noConflict(); j$(function(){ $('.name').each(function() { window.open(this.href); }); }); </script> </apex:page>
does not work in salesforce but if I do it outside of salesforce it does: http://jsbin.com/adome/edit
Try replacing the script section to this, worked for me:
All Answers
Try replacing the script section to this, worked for me:
=)
That will also work :)