Jump to content

Javascript in a webpart.


cyrus_
 Share

Recommended Posts

I am trying to open new window by clicking on a button. when i write the path by myself on the onclick it goes well but when i write the path in my textarea myFile i get "the page can not be found" , I now that it depends on my bad javascript knowledge.here is my code:

 output.Write(ReplaceTokens(      "\n"   +" <FORM runat=\"server\">"    + "  <INPUT TYPE=\"text\" ID=\"myFile\"  NAME=\"MyFile\" />\n "    + "  <INPUT TYPE=\"button\" ID=\"ShowFeedID\" onclick=\"ShowFeed('/wpresources/IgnitoWebPart/MyFile.value')\" VALUE=\"Show Feed\"/>\n"   +" </FORM>"   + "\n"   + "<script LANGUAGE=\"JavaScript\">\n"   + "<!-- \n"   + " function ShowFeed(url)\n"   + " {\n"   + "     window.open(url, \"MyWin\", \"width=800,height=700,resizable=yes\");"  + " }\n"  + "//-->\n"  + "</Script>"     ));

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...