Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Implementation into exisiting ASP page?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedImplementation into exisiting ASP page?

 Post Reply Post Reply
Author
torsja View Drop Down
Newbie
Newbie


Joined: 27 March 2006
Location: Norway
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote torsja Quote  Post ReplyReply Direct Link To This Post Topic: Implementation into exisiting ASP page?
    Posted: 27 March 2006 at 2:36pm

I easly get it to work as a stand alone aplication.

And i almost have it up and running on an exisiting admin page i use.
But i cant get quite to work. What am i douing wrong?
 
The code looks like this:
 
 
[QUOTE]
<%@ Language=VBScript %>
<%OPTION EXPLICIT%>
<%Response.Expires=0%>
<!--#include file="../../include/dbutil.asp"-->
<!--#include file="../../include/dateutil.asp"-->
<!-- include the Web Wiz Rich Text Editor -->
<!--#include file="RTE_editor_inc.asp" -->
<%
select case request("Action")
  case "Lagre"
    Call LagreNyheter
  case "Gå til meny"
    Response.Redirect "Admin-Nyheterliste.asp"
  case "Ny"
    Response.Redirect "Nyheter.asp?Nyheterid=" & NyNyheter
  case "Slett"   
    call SlettNyheter
    Response.Redirect "Admin-Nyheterliste.asp"
end select
sub SlettNyheter
  dim rsl*gre
  set rsl*gre = Getdataset("SELECT * FROM Nyheter Where Nyheterid=" & request("Nyheterid"))
  if not (rsl*gre.eof and rsl*gre.bof) then
    rsl*gre.delete
  end if
  rsl*gre.close
  set rsl*gre=nothing
end sub

function NyNyheter
  dim rsNy
 
  set rsNy = ExecuteSQL("INSERT INTO Nyheter (Overskrift) VALUES ('Ny Nyhet') ") 
  set rsNy = nothing
  set rsNy = Getdataset("SELECT max(Nyheterid) as NyId FROM Nyheter")
  NyNyheter=rsNy("NyId")
  rsNy.close
  set rsNy = nothing
end function

sub LagreNyheter
  dim rsl*gre
  set rsl*gre = Getdataset("SELECT * FROM Nyheter Where Nyheterid=" & request("Nyheterid"))
  if not (rsl*gre.eof and rsl*gre.bof) then
    rsl*gre("Overskrift")=request("Overskrift")
    rsl*gre("Tekst")=request("Tekst")
    rsl*gre("Tekst2")=request("Tekst2")
    rsl*gre("Bilde")=request("Bilde")
    rsl*gre.update
  end if
  rsl*gre.close
  set rsl*gre=nothing
end sub
 
sub InsertItem
  dim rsItem, strSQL, strMake, strCheck
  strSQL= "SELECT * FROM Nyheter Where Nyheterid=" & request("Nyheterid")
 
  set rsItem = GetDataset(strSQL)
  if not (rsItem.eof and rsItem.bof) then
  Response.Write "<TABLE cellspacing=0 cellpadding=0>"
    Response.Write "<TR><td><B>Overskrift</B></TD><TD>&nbsp;&nbsp;</TD><TD><INPUT type=text size=30 name=Overskrift value=""" & rsItem("Overskrift") & """><TD></TR>"
'    Response.Write "<TR><td><B>Tekst</B></TD><TD>&nbsp;&nbsp;</TD><TD><textarea cols=80 rows=10 name=Tekst id=Tekst>" & rsItem("Tekst") & "</TEXTAREA><TD></TR>"
    Response.Write "<TR><td><B>Tekst 2</B></TD><TD>&nbsp;&nbsp;</TD><TD><textarea cols=80 rows=10 name=Tekst2>" & rsItem("Tekst2") & "</TEXTAREA><TD></TR>"
    Response.Write "<TR><td><B>Bilde</B></TD><TD>&nbsp;&nbsp;</TD><TD><INPUT type=text size=30 name=Bilde value=""" & rsItem("Bilde") & """>&nbsp;<INPUT type=button value=""VELG BILDE >>"" onclick=""javascript:OpenWindow()""><BR>NB: Husk å skrive inn nøyaktig filnavn for bilde før lagring!!<BR> fks. vestresving1.jpg<TD></TR>"
  Response.Write "</TABLE>"
  end if
  rsItem.close
  set rsItem=nothing
end sub

%>
<HTML>
  <HEAD>
    <TITLE>SMB</TITLE>
 
    <LINK rel="stylesheet" type="text/css" href="admin.css">
   
   
    <script language="Javascript">
      function ShowPopup(sURL)
      {var winColor=window.open(sURL,"color","toolbar=no,menubar=no,location=no,direcories=no,height=325,Width=300,screenX=200,screenY=200,scrollbars=no,resizable")
}
    </script>
 
    <script language=javascript>
      function OpenWindow()
      {var mywin=window.open('UploadForm.asp','mynewwin','toolbar=no,menubar=no,location=no,direcories=no,height=175,Width=450,left=200,top=200,scrollbars=no,resizable'); }
    </SCRIPT>
    <base target="_self">
  </HEAD>
  <BODY OnLoad="initialiseWebWizRTE();>

  
  
    <FORM action="Nyheter.asp" method="post" name="FormMain" id="FormMain">
   
   
    <%
    Dim strFormName
    Dim strTextAreaName
 'Name of the HTML form the textarea is within
 strFormName = "FormMain"
 
 'ID tag name of HTML textarea being replaced
 strTextAreaName = "Tekst"
 
 %>
 <textarea cols=80 rows=10 name="Tekst" id="Tekst"> test </TEXTAREA>
 
 
      <H3>Redigere Nyheter</H3>
      <font color="#FFFF00" size="1"><br>
      TIPS 1. For å få linjeskift legg inn
      &lt;BR&gt; etter den siste linjen, før den linjen du ønsker å få på neste linje.<br>
      TIPS 2: For å få en paragraf legg til &lt;P&gt;  mellom linjene.<br>
      TIPS 3: For å få uthevet tekst <B>(BOLD)</B> legg til &lt;B&gt; før teksten og &lt;/B&gt; etter teksten som skal utheves<br>
      TIPS 4: For å få kursiv tekst <i>(KURSIV)</i> legg til &lt;I&gt; før teksten og &lt;/I&gt; etter teksten som skal være kursiv<br>
      TIPS 5. For å lage en hyperlink legg inn fks.&nbsp;
      <font SIZE="1">&lt;a href=&quot;http://www.smbservice.no&quot;
      target=&quot;_blank&quot;&gt;<i>Tekst for hyperlinken skrives inn
      her!!</i>&lt;/a&gt;</font></font>
      <BR>
      <BR>
      <INPUT type=hidden name="Nyheterid" value="<%Response.Write request("NyheterId")%>">
      <%call InsertItem%>
      <INPUT type=submit name=action value=Lagre>  &nbsp;
      <INPUT type=submit name=action value="Gå til meny">
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nb
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 27 March 2006 at 3:22pm
I can't see any problem off-hand.

Try running Firefox browser and using the JavaScript console to see if there is an error in the Javascript, it maybe some javascript is conflicting.
Back to Top
torsja View Drop Down
Newbie
Newbie


Joined: 27 March 2006
Location: Norway
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote torsja Quote  Post ReplyReply Direct Link To This Post Posted: 27 March 2006 at 8:00pm
It does not run enny diferent in Opera or Firefox browsers
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 28 March 2006 at 10:47am
Opera doesn't yet have built a built in RTE API so isn't supported, Firefox does.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.