用Delphi开发ActiveX应用于Web上。
用到的第三方控件是TMS的AdvStringGrid.问题就在这里:在AdvStringGrid显示的数据,需要超连结到对应的页面。在程序里已经写好,但在运行时,点击相应的数据,却不能连结的相应的页面。请问这是什么原因?是不是TMS还需要设置?谢谢!
用到的第三方控件是TMS的AdvStringGrid.问题就在这里:在AdvStringGrid显示的数据,需要超连结到对应的页面。在程序里已经写好,但在运行时,点击相应的数据,却不能连结的相应的页面。请问这是什么原因?是不是TMS还需要设置?谢谢!
解决方案 »
- 请大虾帮小弟看几行代码,小弟先在此谢过了!
- 帮我看下这个DLL怎么调用,谢谢
- 如何让程序读取*.SQL文件里的部分语句
- LoginPrompt 属性?
- 已知一个PE文件是由delphi编译的,但如何知道到底由哪个delphi版本编译的呢?
- 兼职的电脑软、硬件维护及对以前提供的软件进行一些功能完善,签约要注意什么?
- 如何写上网代理服务程序(就象wingate)???
- 您好,能告诉我为什么吗 ? 在线请教
- 如何屏蔽掉socket打开时服务器端没有打开所返回的错误?????????急
- 小问题,所以只给20分
- 讨论以下关于内外网隔断,禁掉网卡好吗,如何禁掉(使用)网卡,
- 怎么样才能取出一个ACCESS数据库里所有表的名称呀
DelTempFiles();
ClearHistory();
CInternetSession m_Session("DigitalTitan");
CHttpConnection* pServer=NULL;
CHttpFile* pFile=NULL;
CHttpFile* pTaskFile=NULL;
CString strServerName=strServerIP;
INTERNET_PORT nPort=(INTERNET_PORT)atoi(strServerPort);
CString strURL=strLoginAddress;
try
{
pServer=m_Session.GetHttpConnection(strServerName,nPort);
pFile=pServer->OpenRequest(CHttpConnection::HTTP_VERB_POST,strURL,NULL,1,NULL,NULL,INTERNET_FLAG_EXISTING_CONNECT);
CString strHeaders=_T("Content-Type: application/x-www-form-urlencoded");
CString strFormData;
strFormData.Format("UserName=%s&Password=%s&action=submit",strLoginUserName,strLoginPassword);
if(pFile->SendRequest(strHeaders,(LPVOID)(LPCTSTR)strFormData,strFormData.GetLength())==0)
{
//AfxMessageBox("网络异常...",MB_ICONINFORMATION);
pFile->Close();
delete pFile;
pServer->Close();
delete pServer;
m_Session.Close();
}
else
{
pFile->Close();
delete pFile;
pServer->Close();
delete pServer;
pTaskFile=(CHttpFile*)m_Session.OpenURL(strLoginDataAddress);
CString strBuf;
CString strText;
while(pTaskFile->ReadString(strText))
{
strBuf+="\r\n";
strBuf+=strText;
}
pTaskFile->Close();
delete pTaskFile;
m_Session.Close();
//AfxMessageBox(strBuf,MB_ICONINFORMATION);
int iBegin,iEnd;
iBegin=0;iEnd=0;
CString strTemp;
strTemp="";
iBegin=strBuf.Find("待办方案",0);
if(iBegin!=-1)
{
iEnd=strBuf.Find("更多方案",iBegin);
strTemp=strBuf.Mid(iBegin+9,iEnd-(iBegin+9));
int iResult=strTemp.Find("<td",0);
if(iResult==-1)
{
//
}
else if(iResult<strTemp.GetLength())
{
while(iResult!=-1)
{
iAmount++;
iResult=strTemp.Find("<td",iResult+3);
}
iAmount=iAmount-1;
}
}
}
}
catch(CInternetException* e)
{
char strErrorBuf[255];
e->GetErrorMessage(strErrorBuf,255,NULL);
AfxMessageBox(strErrorBuf,MB_ICONINFORMATION);
pFile=NULL;
delete pFile;
pTaskFile=NULL;
delete pTaskFile;
pServer=NULL;
delete pServer;
m_Session.Close();
return 0;
}
return iAmount;
路径是正确的,点是去根本没有任何的回应。
是不是需要触发AdvStringGrid的某个属性或方法?
可是我要连结不同的服务器,只能用相对路径!请帮帮我!部分代码:
............
............
begin
count := High(AValue);
if count > AGrid.ColCount then
count := AGrid.ColCount; for c := 0 to count -1 do begin
if c = 0 then
AGrid.Cells[0, ARowIndex] := IntToStr(ARowIndex)
else if c = 2 then begin
AGrid.Cells[c, ARowIndex] := Format('<a href="%s=%s" target="_balnk">%</a>',
['http://10.90.50.190/public/enterpriseInfo.asp?entCode',AValue[0],Trim(AValue[1])]) //这样子联结是可以的** AGrid.Cells[c, ARowIndex] := Format('<a href="%s=%s" target="_balnk">%</a>',
['../../public/enterpriseInfo.asp?ntCode',
AValue[0],Trim(AValue[1])]) //这样子联结不可以,如何解决呢????????
**
end
else if c = AGrid.ColCount -1 then begin
dic := Dictionary.FindDictionary(C_Dictionary_audit_status);
...........
...........