|
Keep in mind, GM scripts run after page the page is already built (for the most part).
Sounds like you want to:
- Remove existing event handlers for the button (use FireBug to watch the events that occur when it's clicked, read through the code that attaches them, or just clear any onclick attributes if that's how they did it).
- Add your own handler
- For the mousedown event so as to avoid destroying the selection.
- Or, for the click event, but add a mouseover handler that saves the selection first.
- In your handler, take the selected text, format it as a quotation, and insert it into the textarea.
every night, i kneel at the foot of my bed and thank the Great Overseeing Politicians for protecting my freedoms by reducing their number, as if they were deer in a state park. -- C hris L osinger, Online Poker Players?
|
|
|
|
|
Cool, that should keep me busy till at least next week, thanks.
I somehow had you answering this question in mind when I posted it.
|
|
|
|
|
hi,
In my appication i'm using Oracle as a back end. In that when i'm using ExecuteReader() it shows an exception. Can any one of help me to solve this issue.
<br />
oleDBConnection = new OleDbConnection(connectString); <br />
string query = "SELECT V_FIRST_NAME,V_LAST_NAME,V_PHONE_NUMBER,V_EMAIL,V_FAX_NUMBER,V_ADDRESS,V_TITLE,V_POSTAL_CODE,V_COUNTRY from UserDetails where (V_USER_ID = ?) AND (V_PASSWORD = ?)";<br />
<br />
OleDbCommand oledbCmd = new OleDbCommand(query, oleDBConnection);<br />
oledbCmd.CommandText = query;<br />
<br />
oledbCmd.CommandType = CommandType.Text;<br />
<br />
OleDbParameter par = oledbCmd.Parameters.Add("UserName", OleDbType.VarWChar, 50);<br />
OleDbParameter parm = oledbCmd.Parameters.Add("password", OleDbType.VarWChar, 50);<br />
<br />
oledbCmd.Parameters["UserName"].Value = userName;<br />
oledbCmd.Parameters["password"].Value = password;<br />
<br />
oledbCmd.Connection = oleDBConnection;<br />
<br />
oleDBConnection.Open();<br />
<br />
OleDbDataReader dr ;<br />
dr = oledbCmd.ExecuteReader();<br />
It threw an exception when executing the last line. The exception states that Unspecified error.Oracle error occured,but error message could not retrieved from Oracle.Data Type is not supported.
|
|
|
|
|
Don't double-post.
Paul Marfleet
|
|
|
|
|
i have build a website now i want to deploy it. because i hav uploaded it at server without publishing it first, index page works but remaining did not worked there . someone of my friends told me to deploy/publish it first. i have tried but not working tell me step by step procedure.
best regards
i m Chan Naseeb from Pakistan
|
|
|
|
|
Actually, it should work if you just upload everything on your webserver. (you are talking about ASP.NET 2.0, right?) I did like that once and it was working fine.. but your website won't optimized. So, you can use deploy/publish option to pre-compile the website...
chancomsats wrote: emaining did not worked there
What error are you getting? Are you sure that you uploaded everything (all required dlls)?
|
|
|
|
|
What web server are you using? Sounds like you've got to take a look at the server settings
Among the top items on your checklist should be...
Account settings and permissions
virtual directories
framework settings
|
|
|
|
|
i just want to include news portion on my website so the users can share recent news of their department
plsease help me out how do i made gui for it secondaly help me regarding coding
regards
|
|
|
|
|
Pay attention to forum guideline no.2
Paul Marfleet
|
|
|
|
|
function ReadFileToString(strFileName)
{
var strContents;
strContents = "";
objFSO = new ActiveXObject("Scripting.FileSystemObject");
if (objFSO.FileExists(strFileName))
{
strContents = objFSO.OpenTextFile(strFileName, 1).ReadAll();
objFSO.CopyFile("C:/Winter.tif","http:\\192.168.5.2\share\Winter.tif")
}
return strContents;
} //end of function
|
|
|
|
|
What do you want it to do? Have you run it? If you have, did it work (generally a good indication)?
|
|
|
|
|
Hi all.
How can I get the coordinates IHTMLLIElement (Highlights, Latest releases, Using your computer, ..) at www.microsoft.com
code:
pDoc2 - pointer to the document frame containing element
pElement - pointer at the element
Text - text links
void CExplorerWindow::GetLinkRect(CComPtr<ihtmldocument2> pDoc2, CComQIPtr<ihtmlelement,&iid_ihtmlelement> pElement, BSTR Text, LPRECT Rect)
{
long Top = 0;
long Hight = 0;
long Left = 0;
long Width = 0;
CComPtr<idispatch> pDisp = NULL;
if (pWebBrowser2)
{
pWebBrowser2->get_Document (&pDisp);
if (pDisp)
{
CComPtr<ihtmldocument2> pDoc = NULL;
pDisp->QueryInterface (IID_IHTMLDocument2, (void **) &pDoc);
if (pDoc)
{
CComPtr<ihtmlframescollection2> m_frame = NULL;
pDoc->get_frames(&m_frame);
if (m_frame)
{
long len = 0;
m_frame->get_length (&len);
if (len)
{
CComQIPtr<ihtmlelement> pEl ;
if (SUCCEEDED(pDoc2->get_body(&pEl)))
{
CComQIPtr<ihtmlbodyelement> pBodyElement ;
pBodyElement = pEl;
if (pBodyElement)
{
CComQIPtr<ihtmltxtrange> pTxtRange;
pBodyElement->createTextRange(&pTxtRange);
if (pTxtRange)
{
if (pTxtRange->moveToElementText(pElement) == S_OK)
{
VARIANT_BOOL ok;
if (pTxtRange->findText(Text,wcslen(Text),0,&ok) == S_OK)
{
CComQIPtr<ihtmltextrangemetrics2> pTextRangeMetrics2;
pTextRangeMetrics2 = pTxtRange;
CComQIPtr<ihtmlrectcollection> ptrRectColl;
CComQIPtr<ihtmlrect> ptrHTMLRect;
if (pTextRangeMetrics2->getClientRects(&ptrRectColl) == S_OK)
{
long Len;
ptrRectColl->get_length(&Len);
if (Len)
{
VARIANT VarInd, VarDisp;
VarInd.vt = VT_I4;
for(int i = 0; i < Len;i++)
{
VarInd.lVal = i;
ptrRectColl->item (&VarInd, &VarDisp);
ptrHTMLRect = VarDisp.pdispVal;
long Top = 0;
long Right = 0;
long Left = 0;
long Bottom = 0;
if (ptrHTMLRect)
{
ptrHTMLRect->get_left (&Left);
ptrHTMLRect->get_top (&Top);
ptrHTMLRect->get_right (&Right);
ptrHTMLRect->get_bottom(&Bottom);
//!!! Left, Top, Right, Bottom - 0
}
SetRect(Rect, Left, Top, Right, Bottom);
}
}
else
{
pElement->get_offsetHeight(&Hight);
pElement->get_offsetWidth(&Width);
pElement->get_offsetTop(&Top);
pElement->get_offsetLeft(&Left);
IHTMLElement* pParentElement = NULL;
while (SUCCEEDED(pElement->get_offsetParent(&pParentElement)))
{
if (!pParentElement) break;
long ParentLeft, ParentTop;
pParentElement->get_offsetTop(&ParentTop);
pParentElement->get_offsetLeft(&ParentLeft);
Top += ParentTop;
Left +=ParentLeft;
pElement = pParentElement;
pParentElement->Release();
}
}
ptrRectColl.Detach();
}
}
}
}
}
}
}
else // no frames
{
CComQIPtr<ihtmlelement2> pElement2(pElement);
CComPtr<ihtmlrect> BoundingRect;
if (pElement2)
{
if (SUCCEEDED(pElement2->getBoundingClientRect(&BoundingRect)) && BoundingRect)
{
BoundingRect->get_top(&Top);
BoundingRect->get_left(&Left);
}
else
{
Top = 0; Left = 0;
}
}
pElement->get_offsetHeight(&Hight);
pElement->get_offsetWidth(&Width);
SetRect(Rect, Left, Top, Left + Width, Top + Hight);
}
}
else //m_frame == 0
{
CComQIPtr<ihtmlelement2> pElement2(pElement);
CComPtr<ihtmlrect> BoundingRect;
if (pElement2)
{
if (SUCCEEDED(pElement2->getBoundingClientRect(&BoundingRect)) && BoundingRect)
{
BoundingRect->get_top(&Top);
BoundingRect->get_left(&Left);
}
else
{
Top = 0; Left = 0;
}
}
pElement->get_offsetHeight(&Hight);
pElement->get_offsetWidth(&Width);
SetRect(Rect, Left, Top, Left + Width, Top + Hight);
}
}
}
}
if (IsRectEmpty(Rect)) Beep(200,100); - only if pElement == Highlights, Latest releases, Using your computer, ..
}
|
|
|
|
|
How can i place a file From One system to Another System using
FileSystemObject in javascript?????????
|
|
|
|
|
Hello to all,Please i need to hide my vb code in my asp.net website as all the source code is been copied to IIS when i deploy.
I ll really appreciate all replies.
Thanks
Solami
|
|
|
|
|
What do you mean by hiding your code, to whom you want to hide your code from if you think that users will access these files then you are wrong they are protected by the server itself. If you don't want to use the code behind files then you can also implement the same code inside your aspx pages but it's not recommended you should always separate the business logic with your design.
AliAmjad(MCP)
|
|
|
|
|
I want to package the application and give it to some one to deploy but i dont want im to have access to my source files.(.vb) thats why i really need to hide the code
|
|
|
|
|
If you really wanted to hide your code then why didn't you implement the logic of your application in a class library and used the reference of dll in your application, in this way you can easily encapsulate your code and prevent anyone to access it.
AliAmjad(MCP)
|
|
|
|
|
Compiling code into a DLL won't prevent someone getting hold of the source. A .NET assembly can easily be reverse-engineered by using a tool like Reflector[^]. Using an obfuscator tool will make the code more difficult to understand, but a resourceful person will still be able to reverse-engineer it. If safeguarding intellectual property is paramount, developing in .NET has its drawbacks.
Paul Marfleet
|
|
|
|
|
You can create a Web Application, which puts your code in an assembly. You might need to get an update for Visual Studio to support this.
Then when you publish select "Only files needed to run this application".
Regardless, IIS will not serve .VB files unless you manually configure the MIME type.
|
|
|
|
|
help me in asp code
i wants to create a voice forum and wants to count how many reply is posted and how much time it is read and how many user logon.
so plz help me what is the logic and code we have to use.
other work is i have two table and one table has one primary key and other have two foriegn key when i am inserting data by one post then only one reply is submited if next reply is submitted in child table then error is parrent key not found. if one more record is inserted in parent table then child table also fetch next record but one record .
i.e no of parent table record is equal to child table record .
where is the problems plz any body help me soon as possible.
sanjeev
|
|
|
|
|
idsanjeevjha wrote: where is the problems plz any body help me soon as possible.
You won't find out until you try for yourself.
Your question is of too general a nature to be answered - read the forum guidelines. The programming forums are intended for questions relating to a specific technical problem. If, during the course of developing this piece of software you do encounter some specific issues, by all means post another question.
Paul Marfleet
|
|
|
|
|
Hi,
help me..i want to change the visibility of a div control through javascript...
what i did
var c=document.getElementById(ctl00_divErrorMessageContainer);
c.style.display = 'none';
please anybody help me
|
|
|
|
|
Malayil alex wrote: var c=document.getElementById(ctl00_divErrorMessageContainer);
c.style.display = 'none';
var c=document.getElementById("ctl00_divErrorMessageContainer");
c.style.display = 'none'; also make sure this id exist in the page
|
|
|
|
|
|
Hello,
lately I looked at the Snap Shots preview widget (www.snap.com) and wondered how a specific feature has been implemented:
If you select the options (top right corner) and select something (f.e. a longer delay until the window pops up) the information is stored in a cookie belonging to the snap.com domain. This is no problem, because the options panel shown in the widget is an iframe which is loaded from the snap.com domain.
My question is now, how they get the information in the cookie belonging to the domain snap.com, if the javascript runs in the contex of a completely different domain??
It works, you can try... but how is this done? All I know is, that it is prohibited to access cookies of other domains.
Thanks! I am very interested in any ideas!
Constantin
|
|
|
|