ShuDudu's Home was started in 2011, but the web data is lost, so now begin again, I would like to make some friends, I hope you like ShuDudu's home.
Current position: ShuDudu > Life >

[ASP]About the development of summary plug-in submission form

Friday on September 23rd, 2005Life

about the development of the abstract plug-in submission form

author: the fifth network

the function to be realized is to add a right-click shortcut to the browser to submit the selected web page or picture content! The example is applied in the blog program, that is, when you have logged in, you can see better news or pictures when browsing the web! You can select the content-"right click to appear" to join my web excerpt ", then an IE window will pop up, automatically adding the page title to the corresponding title content of the form, and the selected content to the corresponding content item, as well as referencing the URL, and so on!

first let's write

 Windows Registry Editor Version 5.00 with a text editor.[HKEY_CURRENT_USER\ Software\ Microsoft\ Internet Explorer\ MenuExt][HKEY_CURRENT_USER\ Software\ Microsoft\ Internet Explorer\ MenuExt\ add this page to my excerpt]@ = & quot; http://www.xxxxx.com/UserManage/addblog.asp"

Save as a .Reg file, that is, write the registry key to add the right-click menu.

UserManage/addblog.asp is the processing page
the source file is as follows:

 & lt;html>& lt;head>& lt;meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=utf-8">& lt;title> & lt;/P>& lt;/form>& lt;/body>& lt;/html>& lt;script language="Javascript">Var oWin = external.menuArgumentsVar oDoc = oWin.documentVar titlestrVar start, endVar getzyStart = end =-1Titlestr = oWin.document.selection.createRange () .textFor (var I = 0; I & lt; titlestr.length; iTunes +){If (start =-1)If (titlestr.charAt (I) = ='\ n' | | titlestr.charAt (I) = ='\ r')ContinueElseStart = IElse if (titlestr.charAt (I) = ='\ n' | | titlestr.charAt (I) = ='\ r'){End = IBreak}}If (start! =-1 & & end! =-1 & & start & lt; end)Form1.title1.value = oDoc.titleElseForm1.title1.value = oDoc.titleFor (var I = 0; I & lt; oDoc.images.length; iTunes +){ODoc.images (I) .src = oDoc.images (I) .src}For (var I = 0; I & lt; oDoc.links.length; iTunes +){ODoc.links (I) .href = oDoc.links (I) .href}Form1.url1.value = oDoc.URLGetzy = oDoc.selection.createRange () .textForm1.js1.value = getzy.substr (0250) + & quot;..."Form1.content1.innerText = oWin.document.selection.createRange () .htmlTextForm1.submit ()& lt;/script>

I believe many people understand that the top is an ordinary form, below is a script, and the key is still below:
oDoc.title page title
oDoc.URL page address
getzy = oDoc.selection.createRange (). Text; 'get the selected content in text
form1.js1.value = getzy.substr (0250) + "..."; get the first 250 characters. Finally, as a brief introduction
form1.content1.innerText = oWin.document.selection.createRange (). HtmlText; HTML to get the selected content
form1.submit (); automatically submit the form to the ACTION in FORM, that is, User_Post_Blog2.asp
. The information has been obtained here! After that is the normal ASP form processing! The VALUE of
like the title will be copied as usual with value=<%=request ("title")% & gt;
.

Copyright Protection: ShuDudu from the original article, reproduced Please keep the link: https://www.shududu.com/life/ASP-About-the-development-of-summary-plug-in-submission-form.htm