|
@@ -74,7 +74,7 @@ begin
|
|
Link:=TJSHTMLElement(document.createElement('a'));
|
|
Link:=TJSHTMLElement(document.createElement('a'));
|
|
link['href']:=MakeLink(i,True);
|
|
link['href']:=MakeLink(i,True);
|
|
link.innerHTML:='Go to form <span class="badge">'+IntToStr(i)+'</span>';
|
|
link.innerHTML:='Go to form <span class="badge">'+IntToStr(i)+'</span>';
|
|
- if (Router.HistoryKind=hkHTML5) then
|
|
|
|
|
|
+ if (Router.HistoryKind<>hkHTML5) then
|
|
Link.onclick:=@DoLinkClick;
|
|
Link.onclick:=@DoLinkClick;
|
|
adiv.appendChild(link);
|
|
adiv.appendChild(link);
|
|
end;
|
|
end;
|
|
@@ -94,8 +94,17 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
function TDemoForm.DoLinkClick(aEvent: TJSMouseEvent): boolean;
|
|
function TDemoForm.DoLinkClick(aEvent: TJSMouseEvent): boolean;
|
|
|
|
+
|
|
|
|
+Var
|
|
|
|
+ URL : String;
|
|
|
|
+ p: Integer;
|
|
|
|
+
|
|
begin
|
|
begin
|
|
- Router.Push(String(aEvent.target['href']));
|
|
|
|
|
|
+ URL:=String(aEvent.target['href']);
|
|
|
|
+ P:=Pos('#',URL);
|
|
|
|
+ URL:=Copy(URL,P+1,Length(URL)-P);
|
|
|
|
+ Writeln('URL :',URL);
|
|
|
|
+ Router.Push(URL);
|
|
end;
|
|
end;
|
|
|
|
|
|
end.
|
|
end.
|