Friday, October 9, 2009
Dreamweaver MX skill collects pure
Begin from today, we should discuss the thing of respect of a few skill together, our skill does not go up in the operation, however on backstage application, namely the skill of Asp. MX can generate code automatically, believing everybody has felt is one great leap, also not be the business that what Yao cannot reach again to those design personnel especially. But the negative sex that aught has him, DWMX is not exceptional also.
Above all: The code that he generates is too much, either let abecedarian so easily understand. We can use a lot of time completely the code that less code will come to to replace him to be generated automatically. Next: The page that he needs to manage is too much also, safeguarded personnel to bring bigger trouble to Web that is to say, we often can see there is an After **** Go To in behavior dialog box, it is a hand jump after we complete this operation turn (little skill: Jump turning to also can say is directional, asp code is: Response.Redircet "newpage.asp" ) to a new page. Actually he can accomplish a page completely to go up, such advantage is the page that we should safeguard little, you can not look down upon him, if you can very good control this skill, so you will be OK build the page of 30% less, it is really such, you are not amazed.
Today we for the skill that says this aspect: We basically use an If here... Endif statement, this I think authority is clear, specific how to come true?
For instance: We should build an entry system, do us to want two pages with traditional DWMX, this is a very simple thing, a few code to want only? So I decide to be him in a page.
Process designing train of thought: We should build entry system, should use a list for certain sheetWhen watch sheet is referred we get expressing the value in sheet with Request.form("name") , still having a square hair that passes information between client computer and server is Request.QueryString, he is delivered together with Url, we often see, http://www.cfsky.com/forum.asp? Id=1. Id=1 is QueryString, we can get his value with Request.queryString("id") .
What we should come true is the statement that use If the examination has Querystring, if did not make watch sheet on the page, if have,welcome you in " of the output on the page, city does not have lover " (little skill: The literal " that with Response.write " you want to output can be outputted, also can use <%= " the literal " %> that you want to output)
Basic watch sheet is built on the page, the name is Login.asp, everybody notices: We in
DreamweaverMX is made leave a message this (5)
Favour was sufferred from so long, check. Open Index.asp, press F12. If pursue (7-49) be shown.
7-49
Everything all is mastering in, because did not leave a message, so indication of short duration is not had leave a message. Publish to leave a message look, if pursue (7-50) be shown.
7-50
This page is normal also, click refer leave a message look, if pursue (7-51) be shown.
7-51
Ah, show come also Ye! ! ! ! Very glad, because still do not have a reply, the for the moment that shows so does not have a reply. Good, retry try answer so that leave a message, if pursue (7-52) be shown.
7-52
Well, how to come to this? ? Oh, be written down, this page (Rep.asp) installed page protection, we were defined when be not normal visit, turn to land a page (Login.asp) , this lands a page namely. Do not have method, be landed, user name is Admin, the password also is Admin, I define this oneself in the database. After landing, nod again " reply this theme " , if pursue (7-53) be shown.
7-53
Here, can acquiesce to this " of short duration does not have a reply " undertake modification, can leave a message in order to be opposite content has a return. We change it into " write so long just be written, be stupid! ! " . The graph is like after clicking reply pushbutton (7-54) be shown.
7-54
Ah, really glad, the reply is successful also! ! Still have, everybody notices, above that " welcome you! " became automatically also after we are landed " welcome your Admin! " , this is the achievement that we build Session in front. Check again. If pursue (7-55) be shown.
7-55
Stop on OICQ head portrait when the mouse when falling, can appear " the Oicq number of Hmily is 7142554 " , these also are the fruit that laborious eats with one's shoulder to collar before us, other is like mailbox and homepage to waited to also do not check one by one here.
Be like an editor as to other function, guide row also did not check one by one here etc, this leaving a message smally still is not to be in of course originally perfect, but I offer a kind of train of thought only here, the improvement that hopes everybody can be better it, I am small to this also at the same time leave a message to offer download originally, because build, is DSN join, sys tematic DSN link is established by oneself please after download goes back, the name is Textmx.
DreamweaverMX is made leave a message this (4)
7-36
Remember to define it Index.asp home page turns after submitting data. Make mistake to prevent it, we use an act to it even, do not use server act this nevertheless, the action that takes oneself with DW MX went. Pitch on expresses the Design after odd Form- - > Behaviors- - > Validate Form (design- - > behavior- - > proof list is odd) , if pursue (7-37) be shown.
7-37
Remember to delimit for F_name and F_content those who get on that to fill a field surely tick off, the Number of acceptability type instead of F_oicq, the Email Address of acceptability type instead of F_email.
As to Edit.asp (editor page) , rep.asp (reply page) with Del.asp (delete a page) we deliver the value that com e over to show relevant data before simple acceptance, use Updata Recordt and act of Delete Record server again next, here we are differ also one expatiatory, if the effect pursues (7-38, 7-39, 7-40) be shown.
7-38
Here is Edit.asp page, when building record volume, mix in front identical, want to remember using act of server of Move To Specific Record nevertheless, such ability find corresponding record market. Still have above of the issue that form makes and Index.asp same, just want an indication user renown, the user leaves a message and stationmaster reply changes text casing, pull corresponding database field in text casing, use act of Updata Recordt server finally, index.asp page is returned to go after the definition updates data again. Here still has a bit to want to notice, should put whole old table to the watch Chan Licai is effective.
7-39
This is Del.asp page, should build watch sheet likewise, need not wait for the fu ll name nevertheless change text casing, because just delete data, important still have server travel of Move To Specific Record and action of Delete Record server, index.asp page turns after final definition is deleted.
7-40
This is Rep.asp page, this page and the Edit.asp page above are about the same, also was to use act of Updata Recordt server, different nevertheless is it updated content of a field only, alexandrine should use act of server of Move To Specific Record, change stationmaster reply into text casing, so that super user can input content.
OK, within an ace of was nodded, try hard again hard! ! !
An issue should consider here, how to let have the super user government that runs attributive to leave a message? Can edit namely, delete, the reply. Be about to be used here land, this is a server of server behavior Log In User that had not contacted before us behavior. Same, it learns easily very simply. : )
Open Login .asp page, build frame of watch sheet, form, text, and above F_name of entitle of that text casing, below that entitle F_password, and the type it (Type) instead Password, if pursue (7-41) be shown.
7-41
Application is applied after doing good all these- - > User Authentication- - > Log In User (use a program- - > user appraisal- - > the user is landed) , if pursue (7-42) be shown.
7-42
If pursue,appear (7-43) what show a dialog box.
7-43
Get Input Form Form: Inclined anchor of of Lv of Su Sun You wakes Xing Huansan of brandish of Liu of Yu of Yi Qin of of bluff of Jiao of grandma of vasting サ of Mu San of Ju of ≡ nest mail vasts Chi of ≡ of aether of round brandish of ィ
Username Field: Ti of ≡ of Su Yu americium does not have Nai of miscellaneous Φ of to seek investigate Zhan of apology of Jie N cheek oh ㄒ Piao Sou does not have Nai to seek invest igate _name of Li 猣, so here also chooses F_name.
Password Field: Ti of ≡ of Su Yu americium does not have Nai of miscellaneous Φ of of Li peptone to seek investigate Ying is rare
Validate Using Connection: Bursa of fawn on of A Chinese-style unlined garment of of a surname of Yu americium ≡ of Song of post Mou putting in order imprints
Table: Hut of Song of of Meng of A Chinese-style unlined garment fetterses engrave of Yu of Su of of approach of Huang of cook of ⒁ of of Mo of Yu of rancorring U of which mother graupel cheeks and watch of Dmin of 胊 of A Chinese-style unlined garment,
Username Column: ≡ Ti does not have miscellaneous car to mire brother's son highs field of _name of 膄 of mace of Yu of Song of of Qia of ≡ of Yu americium.
Password Column: ≡ Ti does not have miscellaneous car of Li Piao to mire brother's son highs is rare
If Login Succeeds, g o To: Left-eyed flounder of mother of Jiao of Shan of ず of scull of of Quan ü takes the advantage of cheek of engrave of Gui Yu to embed 砳 of Tao of Piao of ㄒ Chen pray Ndex.asp.
If Login Fails, go To: Left-eyed flounder of mother of Jiao of さ of scull of of Quan brandish ü takes the advantage of cheek of engrave of Gui Yu to embed 絪 of an ancient nationality in China of ㄒ Chen pray Orry.asp.
Restrict Access Based On: Leech cheeks and breaks suddenly ┮ to take the advantage of of of caries of of condition of exuviate of of Su of damask silk of exhausted of bend so as to breakstubborn of family name of dream of prostitute crab to break T of an ancient wine vessel made of horn of Sun of Mei straw to criticize sb's faults frankly noise of Zhu Xian harmonious takes off ≡ 馯 Sername And Password,
Click OK to finish the setting of this page.
We should be answered now one below, o ur Edit, asp, del.asp, rep.asp cannot make others frivolous visit, here is about to use the server act that the page protects. Application- - > Server Behaviors- - > User Authentication- - > Restrict Access To Pags (use a program- - > server behavior- - > user appraisal- - > page data is protected) , if pursue (7-45) be shown.
7-45
If pursue,appear (7-46) what show a dialog box.
7-46
Restrict Ased On: Take the advantage of beautiful; さ harmonious noise stops Sername And Password of 駏 of ≡ of eggplant of cheek of Yu engrave (user name and password) .
If Access Denied, go To: Quan owes left-eyed flounder of mother of Jiao of of clam of of ǚ dream remnant to take the advantage of fact of dream of ǚ of Mei Qian of Pan of ≡ of eggplant of cheek of engrave of Gui Yu to mire 絣 Ogin.asp(lands page) .
The page that needs protection has Edit.asp, Del.asp, Rep, asp, the setting o f every page is same, remember install.
As to last Sorry.asp page, it is a simple page, if pursue (7-47) be shown. Be in this " here " increase a connection, to Login.asp page.
7-47
Was over! Oh, I am saying is to finish eventually. : )
DreamweaverMX is made leave a message this (3)
7-18
7-19
Same, want to notice to have an order, first pitch on mailbox this picture, click Link pushbutton from inside the attribute face plate below again. If pursue,appear (7-20) shows dialog box, if click the word of this piece of picture to join where goes,the meaning here is.
7-20
Previously, we this function is to join a certain page of this locality goes, but in DW MX we can join through choosing Data Sources dynamic page goes. We center the field of Email from the record here, before remembering be in, the face adds " Mailto: of the engrave that shut Yu cuts thirsty of stand upright of the mellow Qu that lure Sun into parts and Ailto of 癿 of an ancient wine vessel made of horn of leech Sun " it is a Html label, join namely open with OUTLOOK come post a letter.
In the meantime, remember to increase Alt property to this Email picture, namely the mailbox of Alt="<%=(guestbook.fields.item("f_name").value)%> is <%=(guestbook.fields.item("f_email").value)%> , click here to give him / " of her post a letter.
If the join method of homepage address pursues (7-21) be shown.
7-21
Bind after deciding nice link, remember increasing Alt property to the picture, the mailbox that changes Alt="<%=(guestbook.fields.item("f_name").value)%> is <%=(guestbook.fields.item("f_homepage").value)%> , click here to give him / her post a letter "
Yes, here is a bit fretful really, be cheered nevertheless, the victory is in to our beck. : )
See present effect, if pursue (7-22) be shown.
7-22
Should do next, give a reply this theme and editor namely, delete increase connection, dynamic change. The server act that uses here is to jump turn to detail page (Go To Detail Page) . In front we built reply page (R ep.asp) , editor page (Edit.asp) and delete a page (Del.asp) , here we are differ also one expatiatory how to have link, if the effect pursues (7-23, 7-24, 7-25) be shown.
7-23
7-24
7-25
Had done above remember doing a thing even after this 3 paces, how does if we leave a message,content have a lot of to do? ? The Repeat Region in wanting to use act of DW MX server here (repeat area) , pitch on shows the whole old table that leave a message, application- - > Server Behaviors- - > Repeat Region, if pursue (7-26) be shown.
7-26
We define it to show 14 records for every page, such a bit more succinct looking, click OK pushbutton.
An issue must consider when accomplishing this one step, how does the user that browse know how many I have to leave a message record? ? Building when us actually when recording part, DW MX is us early to had considered these, if pursue (7-27) be shown.
7-27
First Record Index: Flesh of shovel of Qiong of anxiety of show off of male of Tao instrument
Last Record Index: Tao instrument mires flesh of shovel of Qiong of anxiety of Li large bamboo hatTotal Records: Xiong of armour of bits shovel lows
Had these, we should do just pull them to the page to go up, added corresponding demonstrative character to go, if pursue (7-28) be shown.
7-28
Hold to, was about to succeed! We still need to guide row, because in front we used Repeat Region (repeat area) , if pursue (7-29) be shown.
7-29
Insert- - > Application Objects- - > Recordset Navigation Bar (insert- - > applied process is right picture- - > record volume guides row) , if pursue,appear (7-30) what show a dialog box.
7-30
Recordset: of a surname of Yu americium ≡ places of ability of instrument collect shovel
Display Using: Song of Yu americium ≡ places Jing of the all ow austral punishment Xi to wring sword 瑃 Ext to be a character, images is a picture, we choose Images here.
Click OK pushbutton, if indication effect pursues (7-31) be shown.
7-31
Likelihood it is too big, we can shrink this form, pitch on is after this form in attribute face plate change its Width="50%" into Width="15%" to go, if final result pursues (7-32) be shown.
7-32
Undertake perfecting level finally now, " publish new theme " receive New.asp page repeatedly, below " administrator enters the mouth " receive Login.asp page repeatedly, "Exit land! " on use act of a server, this function prepares for super user actually. If pursue (7-33) be shown.
7-33
User Authentication: Do not have Ъ ā
Log Out User: The shovel is received do not have to arrange an ancient wine vessel made of horn
If pursue,appear (7-44) what show a dialog box.
7-44
Log Out When: Be troub led by location to wring ferment to arrange Ink Clicked of 琇 of Bao shovel sword: Exit after clicking this join. Page Loads: Calculate after the page is shut exit.
When Done, go To: Bi arranges left-eyed flounder of mother of Jiao of dirty cane to take the advantage of cheek of engrave of Gui Yu to embed Ndex.asp home page of 絠 of ㄒ quicklying .
Still have above the {Session.MM_username} that see also prepares for super user actually, show when you were not landed " welcome you " , if super user was landed, can show " welcome your XX! " . Here we should build variable of a Session, if pursue (7-34) be shown, as to the problem of this Session variable, our retrospective is paragraphic li of can detailed introduction. : )
7-34
7-35
If pursue,appear (7-35) shows dialog box, MM_username is inputted in the dialog box. This MM_username variable is DW MX is in use disembarkation server act (we will introduce in detail at the back) hind of automatic generation. Pull it at the same time " welcome you! " before the exclamatory mark between. Ah, let us come one case ~ of ~ of ~ of ~ of ~ of growl growl ~ finished the hardest this part eventually, congratulation, ah. . .
DreamweaverMX is made leave a message this (2)
The basic idea that says it first, take us above leave a message content will make an example: If I leave a message,content is empty, what to show; If leave a message,content is empty, what to show again. If pursue (7-9) be shown.
7-9
Pitch on is whole leave a message Application is applied after content form- - > Server Behaviors- - > Show Region- - > Show Region If Recordset Is Not Empty(is not empty) when record volume, should leave a message namely content is this form demonstrates when sky. Other must say here behavior of a few servers.
Show Region If Recordset Is Empty (if record collect to be empty) : When the record collect is when sky, the area of indication pitch on. Show Region If Recordset Is Not Empty (if record collect to not be empty) : When the record includes a record centrally, indication place chooses area.
Show Region If First Record (if be the first record) : When be in the first record that records concentration, the area of indication pitch on.
Show Region If Not First Record (if not be the first record) : When not was in a record to amass the first record, show chooses extent.
Show Region If Last Record (if be last record) : When be in a record to amass last record, show chooses extent.
Show Region If Not Last Record (if not be last record) : When not was in a record to amass last record, show chooses extent.
Click it, if pursue,appear (7-10) what show a dialog box.
7-10
In this dialog box choice and one's own profession are corresponding record volume, in this page we built volume of a record only, the name is Guestbook. If the effect after using server act pursues (7-11) be shown.
7-11
Leave a message to prevent to should be done not have content when can make mistake, here we apply Show Region If Recordset Is Empty(to should record collect to be even when sky) behavior, apply it " of short duration is not had leave a message " on form, if final result pursues (7-12) be shown.
7-12
Next, let us perfect it, through showing to a few small table are inserted in the old table that leave a message, the platoon is good, insert relevant picture (what here puts is the commonnest little picture on the net. : ) , if pursue (7-13) be shown. Here is a few the basiccest Dreamweaver form kongfu, detail affection refers to this series tutorial other paragraphic.
7-13
Should do now, pull the data in the database in corresponding f orm namely, if pull user name in the unit case at the back of the full name, leave a message content should be put leave a message in the unit case after content, remember pulling F_name to be published at in front, f_time procrastinates to send at at from the back, when such indication, became " XX is published at XX " . See a picture (7-14) be shown.
7-14
Here has a small Bug, namely what we show leave a message cannot undertake the format is changed, namely no matter have how many carriage return,your meeting discovery takes call the turn in yours, when showing won't line feed, and the blank space of two above can become a blank space. This problem can use Spdformat.mxt plug-in unit to solve (plug-in unit downloads here! ) . After installing good plug-in unit, if the method pursues (7-48) be shown. Leave a message content and stationmaster reply should use this plug-in unit.
7-48
Likelihood the person should ask, of those that OICQ and so on in my database how be done. This, do not know everybody knows not to know an Alt property of label of the Img in Html, namely the mouse moves corresponding demonstrative character shows when going up. Be here, we have it and picture corresponding trends is bound calm. The connection after as to the homepage address criterion make it is clicked went to corresponding address, mailbox OUTLOOK is opened to be opposite after be being clicked post a letter of the person that leave a message.
If particular facet pursues (7-15) be shown.
7-15
Have here divide orderly early or late, first the picture of pitch on OICQ, the data set that picks phasing to answer from the record volume of right again (the field that OICQ number deposits in database of here pitch on (F_oicq) , again from Bind To: Lv says Mg.alt of 駃 of ダ americium ≡ , namely the Img label attribute that we tell in front, clicked the Bind from the back to go again, i f bind,decide right word can arise and in front the color like recording part, used act of a server in order to indicate here, if pursue (7-16) be shown. Here we even its beautification.
7-16
Open source and design view, you can discover what a moment ago inserted east east Alt="<%=(guestbook.fields.item("f_oicq").value)%>" is in code, before this paragraph of code puts COPY to it, change among them F_oicq into F_name (the full name field that the person posts in the database) , the OICQ number that makes its final code is Alt="<%=(guestbook.fields.item("f_name").value)%> is <%=(guestbook.fields.item("f_oicq").value)%>" , it is when it shows so " the OICQ number of XX is XX " , dynamic bind decided, much better, ah. .
7-17
Dreamweaver MX makes us leave a message this (one)
Prepare first the job, build a few pages, part entitle: Index.asp: Leave a message this home page, use at showing to leave a message etc. New.asp: Release leave a message newly. Rep.asp: With the page that leaves a message at stationmaster reply. Edit.asp: A few righter leave a message insalubriously content has editorial page. Del.asp: Alexandrine, do not cross a method more firm, delete directly. : )Login.asp: The return that says above, editor, delete wait for an operation to should only stationmaster just has power, stationmaster lands management to leave a message through this page this. Sorry.asp: Land incorrect when returns page.
If pursue (7-1) be shown.
7-1
Our need uses database field to two pieces of watches, if pursue (7-2) be shown. Express Admin to be used at depositing the full name of super user and password among them, express what deposit in F_bbs to post information, at the back we can explain in detail.
7-2
Two fields are built in watch Admin, the name is F_name and F_password, data type is set respectively for text, if pursue (7-3) be shown.
7-3
Watch B_bbs was bothered a bit, need not be afraid of nevertheless, let us come step by step, see a picture first (7-4) .
7-4
Field ID is leave a message the crucial field of content, because its action is very much, set its data kind for automatic number, install it give priority to key, namely pitch on it, pursue bit again (7-4) in the pushbutton in red circle. F_name is leave a message the full name of the user, very simple. What deposit in F_content is to leave a message content, because text data type can deposit 255 character only at most, leave a message to ours for content bit less, so here should install it into remarks, because of remarks type of this kind of data can be deposited at most 65, 535 character, used completely quite. : )F_oicq is leave a message the OICQ number of the user, the setting is the same as user name. F_email is leave a message the Email address of the user, the setting is the same as user name. F_homepage is the homepage address that saves an user, the setting is the same as user name. The time that F_time leaves a message to refer, here should notice, data type should change date / time, want to set an acquiescent value. If pursue (7-5) be shown. This Now() is the function of the buy inside a VBA, it s action is to should be referred when one leaves a message if not demonstrate the value of this field, criterion the time that the system can use current date comes fill this field. F_repcontent is the content that stationmaster replies, leave a message together content. What want an attention nevertheless is to also want to add an acquiescent cost, if pursue (7-6) be shown. If,its action is current this leaves a message if content has not replied, show " of short duration does not have a reply " . Should notice those two double quote, the ability that must input condition to fall in English goes, be like "" , if Chinese falls,input " " can sign up for a fault.
7-5
7-6
The leading role that we are turn for after preparing a database, index.asp, this page is used at showing to keep make peace the join of sex of a few functions, will see its general look first, if pursue (7-7) be shown. Want to remember building record volume at the same time, e ntitle Guestbook.
7-7
Here I am for convenient for the purpose of only, so trashy what picture, probably appearance is above such. Should show the most importantly namely leave a message the person's full name, leave a message content and stationmaster reply, the of short duration below does not have a reply is to be used ensure should do not have any leaving a message content when what show, also can assure to won't make mistake so. So possibly some of careful reader can be asked about, I above build in the database how don't still have like OICQ number and homepage address see? Ah. . Need not urgent, these should be used of course, see a picture (7-8) , this is an appearance that shapes basically.
7-8
How, OICQ, mailbox, homepage, publish time to come out, be like it seems that pretty is troublesome. Need not be afraid of, actually very simple, it is a few little server action only just, let's Go! ! We one step comes.
Everybody is good, we met again. : ) the server action that we related advanced face how to use DW MX in a few chapters will operate a database to mix make dynamic page, but feel a bit random, where is not very good understanding? Yes, what we tell in front is single server act, seem connection of it doesn't matter is same. Be in this one chapter, the server behaviour that if apply DW MX neatly,we will study - - make us leave a message this! (right, leave a message namely this, the server act that uses the majority, and need not write a code. )
Prepare first the job, build a few pages, part entitle: Index.asp: Leave a message this home page, use at showing to leave a message etc. New.asp: Release leave a message newly. Rep.asp: With the page that leaves a message at stationmaster reply. Edit.asp: A few righter leave a message insalubriously content has editorial page. Del.asp: Alexandrine, do not cross a method more firm, delete directly. : )Login.asp: The return that says above, editor, delete wait for an operation to should only stationmaster just has power, stationmaster lands management to leave a message through this page this. Sorry.asp: Land incorrect when returns page.
If pursue (7-1) be shown.
7-1
Our need uses database field to two pieces of watches, if pursue (7-2) be shown. Express Admin to be used at depositing the full name of super user and password among them, express what deposit in F_bbs to post information, at the back we can explain in detail.
7-2
Two fields are built in watch Admin, the name is F_name and F_password, data type is set respectively for text, if pursue (7-3) be shown.
7-3
Watch B_bbs was bothered a bit, need not be afraid of nevertheless, let us come step by step, see a picture first (7-4) .
7-4
Field ID is leave a message the crucial field of content, because its action is very much, set its data kind for automatic number, install it give prio rity to key, namely pitch on it, pursue bit again (7-4) in the pushbutton in red circle. F_name is leave a message the full name of the user, very simple. What deposit in F_content is to leave a message content, because text data type can deposit 255 character only at most, leave a message to ours for content bit less, so here should install it into remarks, because of remarks type of this kind of data can be deposited at most 65, 535 character, used completely quite. : )F_oicq is leave a message the OICQ number of the user, the setting is the same as user name. F_email is leave a message the Email address of the user, the setting is the same as user name. F_homepage is the homepage address that saves an user, the setting is the same as user name. The time that F_time leaves a message to refer, here should notice, data type should change date / time, want to set an acquiescent value. If pursue (7-5) be shown. This Now() is the function of the buy inside a VBA, its action is to should be referred when one leaves a message if not demonstrate the value of this field, criterion the time that the system can use current date comes fill this field. F_repcontent is the content that stationmaster replies, leave a message together content. What want an attention nevertheless is to also want to add an acquiescent cost, if pursue (7-6) be shown. If,its action is current this leaves a message if content has not replied, show " of short duration does not have a reply " . Should notice those two double quote, the ability that must input condition to fall in English goes, be like "" , if Chinese falls,input " " can sign up for a fault.
7-5
7-6
The leading role that we are turn for after preparing a database, index.asp, this page is used at showing to keep make peace the join of sex of a few functions, will see its general look first, if pursue (7-7) be shown. Want to remember building record volume at the same time, entitle Guest book.
7-7
Here I am for convenient for the purpose of only, so trashy what picture, probably appearance is above such. Should show the most importantly namely leave a message the person's full name, leave a message content and stationmaster reply, the of short duration below does not have a reply is to be used ensure should do not have any leaving a message content when what show, also can assure to won't make mistake so. So possibly some of careful reader can be asked about, I above build in the database how don't still have like OICQ number and homepage address see? Ah. . Need not urgent, these should be used of course, see a picture (7-8) , this is an appearance that shapes basically.
7-8
How, OICQ, mailbox, homepage, publish time to come out, be like it seems that pretty is troublesome. Need not be afraid of, actually very simple, it is a few little server action only just, let's Go! ! We one step comes.
Dreamweaver MX makes us leave a message this (one)
Prepare first the job, build a few pages, part entitle: Index.asp: Leave a message this home page, use at showing to leave a message etc. New.asp: Release leave a message newly. Rep.asp: With the page that leaves a message at stationmaster reply. Edit.asp: A few righter leave a message insalubriously content has editorial page. Del.asp: Alexandrine, do not cross a method more firm, delete directly. : )Login.asp: The return that says above, editor, delete wait for an operation to should only stationmaster just has power, stationmaster lands management to leave a message through this page this. Sorry.asp: Land incorrect when returns page.
If pursue (7-1) be shown.
7-1
Our need uses database field to two pieces of watches, if pursue (7-2) be shown. Express Admin to be used at depositing the full name of super user and password among them, express what deposit in F_bbs to post information, at the back we can explain in detail.
7-2
Two fields are built in watch Admin, the name is F_name and F_password, data type is set respectively for text, if pursue (7-3) be shown.
7-3
Watch B_bbs was bothered a bit, need not be afraid of nevertheless, let us come step by step, see a picture first (7-4) .
7-4
The Dreamweaver controllable that make is transverse scroll
1.A layer is inserted in DreamWeaver, this layer as scroll area. The parameter that sets a layer is as follows:
Setting layer number is: Slayer, namely the ID attribute of the layer.
Left be worth with what go up is a position in the page can install according to needing proper motion; It is here 100 with 120 elephants element.
Wide and tall the size that is a layer, also install according to need;
Editing and rearrangement is the active area that points to a layer, be concealed in the part beyond editing and rearrangement, we use this active area to conceal the part of the right side of the layer, this active area is controlled while control layer is mobile next, will achieve the scroll area result that we want.
The setting is right for what show wide, it is here 340; Be equal to below tall.
The code of the layer is below:
<Div Id="slayer" Style="position:aBsolute; Top: 120px; Left: 100p x; Clip: Rect(0 340 120 0); Height: 120px; Background-color: #CCCCCC; Layer-background-color: #CCCCCC; Border: 1px None #000000; Width: 670px" >
We are in a few pictures can be put in the sidewards in the layer, here is replaced with form. And above the size just in time of the layer of the setting can include all pictures.
2.Code is a scroll code below, we insert a mark<Of Div > below:
The cost that LayerW notes when inserting is editing and rearrangement (the value with right Clip) , it is here 340.
<Script Language="javascript" >
<! - - / / By Hve
Of active area of set of Var LayerW=340; // wide
Var LayerH=parseInt(slayer.style.height);
Var LayerL=parseInt(slayer.style.left);
Var LayerT=parseInt(slayer.style.top);
Var Step=0; //scroll Value
Function Movstar(a, time){
If (a<0&&step >-parseInt(slayer.scrollWidth)+layerW | | A >0&&step<0)
Mov(a);
Movx=setTimeout("movstar("+a+" , "+ Time+")" , time);
}
Function Movover(){
ClearTimeout(movx);
}
Function Mov(a){
Slayer.style.left = (step+=a) + LayerL;
ClipL=0-step;
ClipR=layerW-step;
ClipB=layerH;
ClipT=0;
Slayer.style.clip="rect("+clipT+" "+clipR+" "+clipB+" "+clipL+")";
}
/ /- - >
</ Script >
3.Insert a layer to place again " control pushbutton " .
Of the facing before this layer relies on to be in below, with will place " control pushbutton " , the position can be adjusted according to needing proper motion, pursue as follows. The color that form uses here piece regard as control pushbutton, it is better to if make the picture of two arrowheads appearance,be met.
4.In " control pushbutton " fluctuation face code is added respectively in mark.
Here is to be added in form mark<In Td > , if you use a picture to do pushbutton to be added in<In Img > mark.
Wrong button:
OnMouseDown="movover();movstar(3, 2)" OnMouseOut="movover()" OnMouseOver="movstar(1, 20)" OnMouseUp="movover();movstar(1, 20) "
Right button:
OnMouseDown="movover();movstar(-3, 2)" OnMouseOut="movover()" OnMouseOver="movstar(-1, 20)" OnMouseUp="movover();movstar(-1, 20) "
The meaning of code is above point to pushbutton to begin an action when the mouse, press accelerate rate, the mouse leaves pushbutton to suspend an action, - number moves to return way.
5.Finish
Point to when the mouse " control pushbutton " when, meeting towards the left or roll right, nod a mouse to be not put can accelerate scroll rate.
Whole code is: (can copy check in BODY area)
<Div Id="slayer" Style="position:aBsolute; Top: 120px; Left: 100px; Clip: Rect(0 340 120 0); Height: 120px; Background-color: #CCCCCC; Layer-background-color: #CCCCCC; Border: 1px None #000000; Width: 670px ">
<Script Language="javascript" >
<! - - / / By Hve
Of active area of set of Var LayerW=340; // wide
Var LayerH=parseInt(slayer.style.height);
Var LayerL=parseInt(slayer.style.left);
Var LayerT=parseInt(slayer.style.top);
Var Step=0; //scroll Value
Function Movstar(a, time){
If (a<0&&step >-parseInt(slayer.scrollWidth)+layerW | | A >0&&step<0)
Mov(a);
Movx=setTimeout("movstar("+a+" , "+ Time+")" , time);
}
Function Movover(){
ClearTimeout(movx);
}
Function Mov(a){
Slayer.style.left = (step+=a) + LayerL;
ClipL=0-step;
ClipR=layerW-step;
ClipB=layerH;
ClipT=0;
Slayer.style.clip="rect("+clipT+" "+clipR+ " "+clipB+" "+clipL+")";
}
/ /- - >
</ Script >
<Table Cellspacing="10" Border="0" Cellpadding="0" >
<Tr Bgcolor="#FFCC99 ">
<Td Height="100" Width="100" ></ Td >
<Td Height="100" Width="100" ></ Td >
<Td Height="100" Width="100" ></ Td >
<Td Height="100" Width="100" ></ Td >
<Td Height="100" Width="100" ></ Td >
<Td Height="100" Width="100" ></ Td >
</ Tr >
</ Table >
</ Div >
<Div Id="Layer1" Style="position:aBsolute; Width:344px; Height:20px; Z-index:1; Left: 97px; Top: 244px ">
<Table Width="100%" Height="100%" >
<Tr>
<Td Bgcolor="#CCCCCC" Height="14" OnMouseDown="movover();movstar(3, 2)" OnMouseOut="movover()" OnMouseOver="movstar(1, 20)" OnMouseUp="movover();movstar(1, 20)" Width="14" ></ Td >
<Td ></ Td >
<Td Bgcolor="#CCCCCC" Height="14" OnMouseDown="movover();movstar(-3, 2)" OnMouseOut="movover()" OnMouseOver="movstar(-1, 20)" OnMouseUp="movover();movstar(-1, 20)" Width="14" ></ Td >
</ Tr >
</ Table >
</ Div >
Make easily play a window
"How to make play window giving form? " , this is the question that Dreamweaver abecedarian asks via regular meeting. Look for a website that provides specially good effect, or it is Down tool of specially good effect is stickup code not have to! Not easy still. Actually lighter method is to use our most commonly used Dreamweaver. Play window giving form commonly, simple ground can be finished a few times bit. Do not believe? Will look! Want to be operated by the following paces only, you are made easily play a window effect.
1.Above all, from window of the Window- >Behaviors (in menu column - > behavior) or press face plate of behavior of v of shortcut key Shift+F3 directly.
2.If plan institute is shown, press top left corner of behavior face plate " + " date adds behavior, choose in playing the menu that go out " Open Browser Window (play a browser window) " behavior.
3.After choosing action, can shoot a dialog box of Open Browser Wi ndow, if plan institute is shown. Want to write corresponding window message in the dialog box only, by " affirmatory " hind can finish what give the window to playing is custom-built. Among them
"URL To Display " : Want to show the address of the webpage in new window for you, you can input an address directly, also can press " Browse " pushbutton is appointed.
"Window Width " with " Window Height " : What be new window respectively is wide and tall, the unit is Px.
"Attributes " : For the character of the window.
"Navigation Toolbar " , " Menu Bar " , " Location Toolbar " , " Scrollbars As Needed " , " Status Bar " , " Resize Handles "
Represent column of tool column, menu column, fixed position tool, scroll respectively and change size handle. Choose on before corresponding position to ticking off, corresponding character is had in representing new window.
"Window Name " : For the name of target window. Can remove casually, also can designate the name of window of some of frame inter block. In make when playing a window, it is OK that the name removes casually.
Finished above after a few paces, behavior face plate will become below this appearance, express to be record in a page (OnLoad) while, open a new window that browse.
Actually, the process of behavior is added in behavior face plate, it is the course that Dreamweaver builds Javascript code. In a few paces above, generated following code. Show with thick substance below, show with thick substance below,, <! , " and "- - > " the is this part code annotate between:
<Html >
<Head >
<Title > does not have caption documentation</ Title >
<Meta Http-equiv="Content-Type" Content="text/html; Charset=gb2312" >
<Script Language="JavaScript" >
<! - -
Function MM_openBrWindow(theURL, winName, features) {//v2.0
Window.open(theURL, winName, features);
}
/ /- - >
</ Script ><! , open the window according to passing the cost that come over- - >
</ Head >
<Body Bgcolor="#FFFFFF" Text="#000000" OnLoad="MM_openBrWindow('yourpage.htm' , 'winname' , 'toolba r=yes, location=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, width=300, height=200') ">
<! , the value of each property that the setting flips a window, pass the cost each corresponding form ginseng, install arouse incident to be OnLoad- - >
Play a window effect
</ Body >
</ Html >
You can understand the code above so: When OnLoad incident is aroused (load when image or page end namely when) , call MM_openBrWindow() method, will be worth
"'yourpage.htm' , 'winname' , 'toolbar=yes, location=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, width=300, height=200' "
(Solid ginseng is called here) the form that passes into correspondence is joined -- " TheURL, winName, features " , use for Window.open() . Attention, 3 parameter should rise with only quote draw together. In these code, one the most crucial is:
"Window.open(theURL , winName, features) "
In the window that its means is WinName in the name, the character of the regulation that presses Features opens the page on TheURL address.
After the meaning that understood code, we can know such writing code is OK and direct: In<Join inside Body >
OnLoad="window.open('yourpage.htm' , 'winname' , 'toolbar=yes, location=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, width=300, height=200') "
. This kind writes law and Dreamweaver to generate the effect as good as of code automatically.
The meaning that we had known 3 parameter inside Window.open() -- the first address that wants indication page for place, the 2nd is the name of target window, the 3rd is the description of the exterior character of the window. The first, 2 parameter were not told more, we tell the 3rd parameter. To the 3rd parameter, such we are OK writing
"'toolbar=no, locat ion=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=300, height=200, left=100, top=100' "
Here Toolbar represents tool hurdle, location represents address hurdle, directories represents navigation, status is condition column, menubar is menu column, scrollbars is scroll, resizable is change size handle, and what Width, Height represents the window respectively is wide and tall, left, Top states the window plays the seat that give.
Toolbar, location, directories, status, menubar, scrollbars, the value of Resizable can be set for Yes, No, 1 or 0, yes(1) states new window has this character, no(0) is denied. And the value of Width, Height, Left, Top should be filled with the number, the unit is Px.
Told so much, did you understand? Behavior is added in Dreamweaver, make is playing a window very simple? Handwritten code also is not very difficult! Want you to be carried out slightly again only, inside very short time, you c an feel: Do so play a window, it is so simple!
Dreamweaver MX Ultradev is explored (5-1)
Continue the brigade of our Dreamweaver MX, the server behaviour that in on one chapter we studied how to use DW MX to be taken oneself updates the record in the database, everybody still ought to answer remain fresh in one's memory. Its powerful server act can be below the case that we need not write a code undertake operating to the database in the database, for example in front mentioned insertion, newer, delete etc. In this one chapter, if use DW MX to undertake deleting to the record in the database,we will learn.
The basic idea that says it first. : ) the page that allow may include to make an user delete a database to record through the browser in WEB application, it is preexistence normally the record that should delete shows on the page, the operation that occupies a library through user logarithm next will delete needless record. Took a Delete Record oneself in DW MX (delete a record) server behavior, come to what logarithm occupies a library delete undertake operating. Operate with the newer database that we learn in on one chapter actually very much the same, pass the data that browse first, the choice wants the data that delete, undertake deleting a page accordingly next, affirm delete. Concrete step is here differ also one expatiatory, refer to please go up to see.
<1>Preparation works, in on one chapter we were told about how to use jump turn to detail page to join (Go To Detail Page) server behavior jumps turn to relevant database to record a field. Here not exceptional also, if pursue,show the result finally (5-1) and (5-2) be shown.
5-1
5-2
The detailed field that makes above is here differ also one expatiatory, specific refer to the 4th chapter please. : )
<2>Good, early days job already prepared to end, this our leading role is De lete Record (delete a record) server behavior. Its function is very simple also, see a name know it uses those who delete record volume technically namely. OK, build us child page, receive the cost that the first page passes, show corresponding database is recorded. These is in in the 4th chapter we also have tell, if pursue,show the result finally (5-3) and (5-4) be shown. Remember to put form into watch sheet, undertake naming to the text casing inside.
5-3
5-4
<3> Delete Record(deletes a record) detailed introduction. Application- - > Server Behaviors- - > Delete Record, if pursue (5-5) be shown.
5-5
Click if pursue,appear (5-6) shows dialog box. The renews database content server action that place of before discovering it and us not hard one chapter explains is very similar.
Connection: The database that can issue the choice in drawing list to want to use from this joins, if do not have, can click the Define from the back to define join of a database again.
Delete From Table: Fall in this in drawing list, can choose to want to delete the record of which watch in the database.
Select Record From: Choose to want use record volume name here.
Unique Key Column: The crucial field that pitch on wants to delete record volume to be in a watch, if crucial field content is a number, need pitch on right Numeric answer choose casing, general we use what it acquiesces to go here.
Delete By Submitting: Fall in this in drawing list, the choice submits the name expressing sheet that deletes an operation. Go up because of our page a sheet of a watch, and did not undertake naming to it, so it can choose Form1 automatically, if single to the watch name undertook change or many express sheet, want to choose corresponding watch sheet.
After Deleting, go To: Finish after this deletes an operat ion, jump turn to which page, here we input Delok.asp. (do not forget build this page! )
5-6
If the result that the page after completing this operation shows pursues (5-7) be shown, the place that used server act can be indicated by different color.
5-7
<4> Check finally!
Let us see the record in the database first, if pursue (5-8) be shown.
5-8
The effect of give typical examples of homepage face pursues (5-9) .
5-9
Here we choose to delete the first record, click what ID is the record of 1 to go up to delete, can jump turn to delete child page, if indication effect pursues (5-10) be shown.
5-10
After referring, can jump turn to us a moment ago above in the Delok.asp page of the definition, see the record in the database again, if pursue (5-11) be shown.
5-11
Ah. . . Everybody also ought to see, the record already w as deleted.
DreamweaverMX Ultradev is explored (4-2)
<4>Hum, this is pretty good, how do I know here wants to which record show then? Is what click with the user right not how does number do? Need not urgent, DW MX has thought everything early to us, LOOK ~ ! It is Move To Specific Record (shift arrives specific notes) ! Application- - > Server Behaviors- - > Recordset Paging- - > Move To Specific Record, same, this also is the action of a server that DW MX takes oneself. If pursue (4-5) be shown.
The graph appears after clicking (4-6) what show a dialog box. The record index that the action of Move To Specific Record is concentration of mobile and current record arrives suitable position, specific place delivers positional parameter to decide by URL. Be like very fathomless appearance, be afraid of dreariness without this actually, and listen to me fine fine line comes. We were applied in front jump the server behavior that turns to detail page delivered an URL parameter to arrive child the page comes, be here so we are about to receive this parameter, next according to this parameter, locate the corresponding record in the database, such ability show correct database content is on the page, won't appear so the record is opposite on the circumstance of date.
Move To Record In: ≡ Song is nose of ability of shovel of collect of Mei of basketry A Chinese-style unlined garment
Where Column: The field of parameter of RL of 琔 of of ≡ purplish or white patches on the skin.
Matches URL Parameter: Bed of of Lang asks chasm of Mi Na of ㄒ of Suo of regretful of decadent of of blown away by wind sneer is fourth
4-6
<5>We are mentioned in front child the page executed two different operations, the first shows data namely, what what we do above is prepare to show accurate data. Be about to bind the field in the database next in deciding corresponding text casing, narrate like place of the 2nd chapter, procrastinate pull a mouse to go, so simple. Final figure if (4-7) be shown.
<6 of of 4-7 >Good, need last step, cheer! Update the content in the database. Still be our old friend Application- - > Server Behaviors- ->Updata Record. If pursue (4-8) be shown. With Likede, also DW MX takes this server action oneself, those who see its is powerful. :)
4-8
One dialog box appears after clicking, the elite of this chapter was here, if pursue (4-9) be shown.
Connection: Inclined anchor of of Lv of Su Sun You wakes ≡ Duo pays brandish of of Quan of of Guo of Song of of neon of busy of ㄒ elder brother of cherry of of herd paying ǖ is foolish pushbutton of セ 鱀 Efine will define.
Table To Update: Jue of Song of of neon of busy of of of a sur name of ≡ of Su Yu americium vasts take engrave of Yu of Su of exhausted to cheek and dam of grand does not have П to rancor of slash of shovel of our instrument collect breaks book to take off ≡ Chi dam to do not have П to rancor thin
Uniqun Key Column: ㄒ returns field of D of 腎 of envy of shovel of Qiang of J of ǔ of ㄍ of school of of burying Piao of ≡ of of Piao school) , identify the record on database watch sheet. If the value is a number, tick off please choose Numeric option.
After Updating, go To: Guan rash bursa of of of of the scepter that bask in takes the advantage of cheek of engrave of Gui Yu to embed Ditok.asp of 絜 of ㄒ Hou (remember build this page oh) .
Get Values From: Quarrel of patch up of Yu americium ≡ takes the advantage of of ability of shovel of bright of consent of board aing concubine of an emperor to seek of quiet of neon of Mei of cowardly of cheek of of vasting ッ to show 礔 Orm1.
Form Elements: Nai of mace of vasting ダ of Ba of ㄒ of of of lie of negative ascend of collect of of ability of canister Jia whencing shovel is sought investigate lofty of brother's son of Song of of neon of miscellaneous Φ of of Tu of of Jia Jiao emperor aning enclosure for storing grain
Column: Noise of Jin of of Jiao bad neon stops free time of of fawn on of Wen of word of of of lie of bursa of of ability of whencing shovel of canister Jia to hold dream of A Chinese-style unlined garment of scabbard of cheek of engrave of Yu of Xin Shu U in the palm to seek Ju Ting
4-9
The page after finishing shows be like a graph (4-10) be shown, the place that used server act can be indicated by different color.
~ of ~ of ~ of ~ of bluff of 4-10 heretoes success, tired dead I. : ) come, check!
This is us the content in original database!
4-11
This is the result that our homepage face shows, notice that " editor " ? Here I nod ID to be the join of 2.
4-12
Result no less than what we expect in that way, what the page shows is ID is the record of 2, note two Zhang Tu's contrast, here I change mailbox.
4-13
Will open us again present database file, saw? The address of mailbox already changed.
4-14
Issue one order, we will be told about how to expunge a record in the database, pay close attention to please. Dreamweaver MX, make our world more beautiful.
DreamweaverMX Ultradev is explored (4-1)
In on one chapter we were told how to new content is added in the database. But do not know everybody to notice a kind of such conditions, if my database records discovery of the ability after be being referred to be in,made mistake? How to do? Be about to revise of course. But will modify the content in the database through WEB,revise us this. Sound seeming also is not too easy. Irrespective, pass in front the introduction of a few chapters, everybody ought to discover, the database is called in DW MX exceedingly simple, want you to nodded a mouse a few times to go only. Ah. . . The content that updates a database this is same also, special simple, let's Go! ~~ !
Good, let all of us understand the basic idea that database content renews. Make an example first, what if the user data in 5D forum is updated,use is database content newer. This kind of page is homepage face normally (before page) - - child page page (hind one page) , homepage face lets an user choose a record to update (the individual information in 5D forum is to let an user choose a record to update) , deliver a parameter next child page, at the same time child the page executed two kinds of different operations. Above all, it shows the data that already existed, can be revised by the user so, next, it updates modified database content.
<1>Above all, we build record volume, tell as place of the 2nd chapter in that way, apply again repeat region behavior to establish many record, here I not repeat these measure. Practical effect graph if (4.1) be shown.
4-1
<2>Does everybody notice above that " editor " ? This is us the leading role of the first pace - - jump turn to detail page to join (Go To Detail Page) . Mention in front refer a parameter in homepage face child page. Here this " editor " it is to have this effect, can deliver a p arameter to arrive when clicking it below one page. We use mouse make choice of first " editor " these two words, again Application- - > Server Behaviors- - > Go To Detail Page, this also is the action of a server that DW MX takes oneself, if pursue (4-2) be shown.
4-2
Interface of a dialog can appear after clicking a mouse, if pursue (4-3) be shown.
Link:
Detail Page: Su Sun Xin is sought investigate the URL address that Han of arsine of Cong of blood clam spade dare take page of SP of miscellaneous , also can click Browser pushbutton to choose. We input Edit.asp here.
Pass URL Parameter: Sun Xin is sought investigate RL of 齍 of ü of of guanidine of Cong of blood clam spade passes the parameter name in detail page, remember can wanting to be defeated good write down of a bit ah, at the back we are used even.
Recordset: RL of 齍 of ≡ Lian ü delivers the record volume that parameter place belongs to. Meaning to fr om which be recorded deliver in collect ginseng go out? Here chooses the name that a moment ago we build to be the record volume of Testmx.
Column: The records concentration field title that RL of 齍 of ≡ Lian ü transfers parameter place to belong to, install URL to deliver the origin of the value of parameter namely. Here we choose ID, you also can choose other, but remember at the back change to want to be opposite.
URL Parameters: Tao of of rice huller Gu takes the advantage of Ma instrument to seek parameter of RL of 猆 of Chi of vasting ブ bottom to be delivered child page. In us we did not use watch sheet on this homepage face, need not choose so.
Form Parameters: The means that Tao of of rice huller Gu takes the advantage of Ma instrument to seek parameter of RL of 訳 of vasting ブ surname is delivered child page. In child on the page OK and OK read through Request.form take here to deliver the parameter that come over. Alexandrine, did not express sheet, do not choose so. (note: Request.form is ASP in one basic built-in to resembling, detailed method refers to relevant data please. )
After clicking OK pushbutton, former what we choose " editor " will become what contain dynamic content to exceed text to join.
4-3
<3>Hereto, the preparation that the parameter of our homepage face delivers works to already was finished, remain? Nature also is the grand opera of this chapter- - update database content. Build one page, the definition is ASP, script is VBSscript, save for Edit.asp, namely we above what input, can not want to be defeated by a fault, otherwise can make mistake again. Next the thing builds record volume namely, with homepage face, build watch sheet next, with convenient user the input updates a record, specific if pursue,show (4-4) be shown.
Narrate with place of the 3rd chapter, in the name that should remember so that the setting expresses casing of the t ext in sheet likewise and database consistent.
4-4
DreamweaverMX Ultradev is explored (3-2)
<4>Our grand opera came, just be to be experienced truly here when DW MX is powerful, you need not write a code to be able to achieve a lot of results that look very difficult. Application---> Server Behaviors--->Insert Record, if pursue (3-7) be shown.
3-7
DW MX took a lot of economic server action oneself, resemble the insertion of data, newer, delete etc, we do the insertion of introductory data temporarily here, we are explaining other action later. Click it, appear a dialog box that inserts data, if pursue (3-8) be shown. This dialog box allows to use the expresses unit element to build his database that can use on the page. Each region need to fill in below.
Connection: Can be in Connection (join) the database join that the choice in list circle is being drawn below the database appoints, if did not appoint join, can click Define (definition) join of pushbutton definition database. Here we choose us a moment ago above the database Testmx that has appointed.
Insert Into Table: This issues a be all watches in the database draw list. We choose the data that a moment ago we build to express here " the user is expressed " .
After Inserting, go To: This admissibility is being finished after inserting, weigh the user directional to another page, namely data saves the page that the user shows to look after entering a database successfully, tell an user data already was inserted into the database. Here our definition is Insertok.asp. Note: Did not forget to build this page, if cannot find a page,can sign up for a fault!
Get Values From: Orm1 of 猣 of dream of shaddock of razor clam of colour Sun catfish. It should be the exclusive; expressing sheet on the page but if many express sheet, hand in a when use watch sheet likely to fall draw list.
Form Elements: Text region should is here by the row entirely. Must install one by one all this this entry, include to choose the element that express sheet, below the data row that the choice gets used to and text casing appropriate data kind. User famous general is inserted " user name " in the row, the password will be inserted " password " in the row, mailbox will be inserted " mailbox " in the row. A moment ago we above the field name of the name that defined text casing and database one buy, so DW MX can make them automatically corresponding, after we are in, ought to let express single name and database field name as far as possible one buy, this is a good convention.
Column and Submit As: Be in the data type when text casing is referred, general we need not choose, DW MX can make a choice automatically.
3-8
<5>After completing these step, can click OK pushbutton, server Behavior is handed in be gotten on to this pa ge by application. Server Behavior will be automatic write all code to the page, the insertion of the database that finish. If pursue (3-9) be shown. DW MX can indicate with different color here used act of a server.
3-9
Finally, check! If pursue (3-10) be shown.
3-10
<6>Refer, open the database that a moment ago we design again, if pursue (3-11) be shown, the content that we a moment ago referred, darling lying inside, ha. . . Dreamweaver MX, make our world more beautiful.
3-11
In below one chapter, we will be told how to update the data in the database, DW MX still has the function with stirring more to waiting for us to use
DreamweaverMX Ultradev is explored (3-1)
Good, receive go up to be told, before one chapter interprets content of dynamic indication database, believe everybody present mood already was very excited, ah. . . It is a heart in thinking early, ought to can can oneself also add data by hand on the webpage? Be no problem of course, DW MX already prepared everything for us. Generally speaking, want to pass ASP page to add a record to the middle of the database, need offers the interface of user data-in, this can include watch sheet and page to come true through founding. The Insert Record that uses Dreamweaver MX (insert record volume) server behavior, OK to the record is added in the database.
Gibberish says less, build one page, if pursue (3-1)
3-1 ought to everybody is met.
<1>After clicking, you can discover, occurrence page and DW or UD are very big before do not show, if pursue (3-2) be shown. DW MX is founding different dynamic webpage respect to appear very convenient, can select the kind that oneself want at will, and need not choose even like before save a type. Here we choose to found dynamic page (Dynamic Page) , choice VBScript regards the script of the page as the language. OK, save for Insert.asp.
3-2
<2>We are built with ACCESS occupy a library, save a name to be " the user is expressed " , if pursue (3-3) be shown. Appoint ID to give priority to key, the data kind that sets it at the same time is automatic number.
3-3
Everybody notices, here I used field type Chinese, if be in before UD times, it is absolutely cannot appear of Chinese, but arrived DW MX times, we can be used eventually, touch Ing. . . Reflect the introduction of the 2nd chapter, build systematic DSN, establish good database link in DW MX at the same time, if pursue (3-4) be shown.
3-4
<3> Good, preparative work was finished eventually to here. Mention in front the record is added in wanting to face a database through ASP page, need offers the interface of user data-in, namely we should build watch sheet on the page, provide the area that lets user input, such data that we just can submit the user are saved in entering a database. Design following interfaces, if pursue (3-5) be shown.
3-5
Noticed the gules number above? Not urgent, here still has a bit to want to notice, if pursue (3-6) be shown. Want to designate the name of these text casing, the first " user name " I appoint the text casing at the back of it for " user name " , other two duplicate, appoint respectively for " password " , "Mailbox " , the kind that just wants this one to notice a password (Type) should appoint for Password, such users see when inputting a password is date of a string of * only. Note: Name to text casing in UD before cannot use Chinese, but also can use in DW MX now.
3-6
Dreamweaver MX Ultradev is explored (2)
Go up to told us to basically negotiate the link that installs a database, we should begin true implementation tiring-room application today, get data from inside the database, what tell in front prepare to work today. The webpage that we see nowadays basically is dynamic, alleged trends combined a database namely, replace news automatically. Retrieving data from inside the database is among them the basiccest, also be a kind of our most commonly used dynamic means. We are about to carry inquiry below, the Product in Northwind database retrieves product information list in the watch.
If the attention is in when setting site, the Access in Testing Server option installs FTP please or Local/Network, (the 2-1 that be like a graph) , otherwise Bindings cannot be used.
Graph 2-1
Choose the Bindings label in the Application face plate of right . Press plus button (the 2-2 that be like a graph)
Graph 2-2
In Recordset dialog box, have detailed setting, following:
Name: DisProduct
Connection: Northwind (it is that link that we establish in going up to be told, can choose)
Table: Product (listed here all watches in the database, we choose Product)
Columns: All fields in Product are inside, if choose Select sheet to choose pushbutton, so we can undertake filtration to the field. (the 2-3 that be like a graph)
Graph 2-3
After the setting ends, we can have a test, press the Test button of right, it is very surprizing, the data that we need has listed entirely came, the force of the tool is great! (the 2-4 that be like a graph)
Graph 2-4
Click OK to return Recordset dialog box, click OK to return a page again, at this moment the change that we can see appear in Binding label, the name that we build appeared for the inquiry of DisProduct. I think ev erybody saw this very should easy think of an object, very intuitionistic, easier than the target is being established in code understanding became much (the 2-5 that be like a graph) click the "+" date on the side, spread out, before Product expresses all medium fields to appear in you. (the 2-6 that be like a graph)
Graph 2-5
Graph 2-6
Our purpose is to want to show product list on the page, the job below you will discover, indicating the thing in the database on the page is how easy, you will again those who experience a tool is great.
One is built on the page two 4 form, fill respectively in group on: Product name, unit amount, monovalent, stocks (the 2-7 that be like a graph) these are the fields that we want to show on the page. Below one, we will put in the content of the field.
Graph 2-7
Choose the field that develops in Bindings, we choose field of " of " product name first, be in the 2nd of form next t he first clicks a mouse, make cursor amid is blinked, return Bindings face plate next, click Insert pushbutton, (the 2-8 that be like a graph)
Graph 2-8
Ordinal measure " unit number with same method, monovalent, stocks " field inserts form in, (the 2-9 that be like a graph) , still have a more simple method, it is you can procrastinate move a field reach the place that should place, the effect is same, and more simple. Good, read former code now, if you are the abecedarian of an Asp, tell you an experience, read the former code that Mx generates more namely, to you study Asp has very great help. Because can discover after you, oneself simple accretion a few code can try two pages to incorporate, log onto a page for instance, that is hind word, see you can know slowly.
Graph 2-9
Good, save your page now, seeing your labor gain in the browser next. Must not tell me you do not know how to debug Asp page! Show how, have a result only, ve ry make you disappointed. Ha, record finger did not move, show party only of course. Look then.
We should begin to tell Server Behaviors, use her to be able to realize a lot of functions, did not say first, look slowly, the problem that we should solve now is how to show all records. Pitch on form all the 2nd unit case (the 2-10 that be like a graph) ,
Graph 2-10
Click the "+" date pushbutton of Server Behaviors label, issueing Repeat Region of the choice in pulling menu, in Repeat Region dialog box choice All sheet chooses pushbutton, if you do not think it is OK also to show entirely,the sheet above the choice chooses pushbutton, the amount that the input hopes to show (the 2-11 that be like a graph)
Graph 2-11
The pushbutton that press OK is returned. Appeared more again in Server Behaviors label a behavior (the 2-12 that be like a graph) . Examine former code, you discover he just added statement of a loop.
Graph 2-12
Save what what do to alter, debug again, how, you are in (graph 2-11) in how much to install to come out how many. Come here today the position, everybody can be reviewed well the following, basically be to build inquiry, there still are a lot of keys inside.
To be continued...
Dreamweaver MX Ultradev is explored (1)
Attend one class, we just introduced the new function of respect of MX backstage database simply, we should begin to learn his function truly today. Dynamic page is the mainest is database of combinative backstage supporter, update Web page automatically, so our tutorial from only then it is to mix eventually oneself the database is not divided, left a database to also do not talk to go up what trends page. So we basically negotiate the link that how installs a database in MX today.
The link that establishs a database is the bridge that Web page leads to data, the accretion of any forms, delete, revise, retrieving is to build what undertake on connective foundation, can imagine connective importance. Because this establishs correct link,be the first when we learn.
Again you think possible the place builds a folder, give a name for Dwmx (of course you have right need not this name) , an Access database is built inside, the beat of Northwind.mdb of database of give typical examples that had better be an Office Access goes in, because we will be used to his henceforth. Enter MX, be in before the elephant Dw or it is Ud in same, install a site, catalog is the list that we a moment ago built, acquiescent language is Asp VBScript. Of course you also can be installed in the Files face plate of right.
Build a file, do in playing the window that give (the 1-1 that be like a graph) setting. Because MX joined a lot of new backstage supporter to develop a language, contained newest technology, can select the kind of the page when building a file so, if be dynamic page, choose appropriate tiring-room to develop a language even. Here we choose Dynamic Page and Asp VBScript of course, I think this is the choice of major friend! Press Creat pushbutton.
Graph 1-1
Preparative work has been done, begin join database, spread out the Appli cation face plate of right, choose Databases label, press "+" button, choose Data Source Name (DSN) (the 1-2 that be like a graph)
Graph 1-2
In shooting the dialog box of Data Source Name (DSN) that give proceed is installed. If you had installed join in the ODBC of Control Panel, so you can help the link that you find to build in list below Data Source Name (DSN) , a name is inputted in Connection Name, press Test button, if succeed, so the database is good with respect to join. But, how to if are we done not have,do in join of the setting in ODBC?
1, very simple, click Define... pushbutton, can enter ODBC data source control implement. (the 1-3 that be like a graph, )
Graph 1-3
2, label of selection system DSN, click add pushbutton (the 1-4 that be like a graph)
Graph 1-4
3, the data driver that chooses us to want to use, choose here (the 1-5 that be like a graph) .
Graph 1-5
4, click the pushbutton that finish, choose the route of the database, should be Dwmx/northwind.mdb. Have a name to data source. Call "testmx" ! (the 1-6 that be like a graph) .
Graph 1-6
5, click the data cause that can see us certainly "testmx" (the 1-7 that be like a graph) .
Graph 1-7
6, the dialog box of Data Source Name (DSN) in clicking affirmatory pushbutton to return MX. In Connection Name input name "northwind" checks, if succeed, with respect to OK.
We read the Databases label of Application face plate now, have the data cause that we build! (the 1-8 that be like a graph)
Graph 1-8
Good, our bridge had built, should pass him to take data in the database namely next.
To be continued...
Dreamweaver MX Ultradev is explored (introductive)
Did Dreamweaver MX today, this also is the product of the 3rd MX on my at hand (it is Flash MX, ColdFusion MX before) , this year can be a MX really year ah! Since passed after year, macromedia catchs about the good news of MX, everybody is waiting, have immediately 4 (Fireworks MX) . I was Macromedia to worry a bit really now: Later the next version of these products should use what name, ah. Gibberish says less, dry one's proper business.
Present MX backstage respect not only still can have Asp.net and Php and Coldfusion MX with Asp, Jsp, Coldfusion, everybody optional leeway much, happy! Support newest Coldfusion MX Tag, debug Coldfusion MX code, support Asp.net Datasets completely, dataGrid, datalist.
MX cries in the article after the MX (that start, dreamwerver was not added, type troublesome) , the interface that start and Flash MX feeling are poor, really I think other MX product is imaginable is such! After entering an interface, layout is mixed Flash MX very elephant, face plate color and position are about the same, the unity of this respect makes broad use move more easy begin. We basically discuss Application face plate here (because mix,the thing that Asp concerns was here) , we did not discuss other face plate here, that is the thing of the tiger, if be a novice, I can say sorry to to you here only.
Tell everybody good news, the tiring-room part that I discover MX is medium and the UD previously seem to distinguish not quite. His functional label is included completely in Application face plate (the Qy-1) that be like a graph, click Application, see not, the thing that often sees in UD previously appeared here entirely.
Graph Qy-1
Spread out Application face plate, (the Qy-2 that be like a graph)
Database: Define database join
Bindings: Undertake counting occupying binding deciding
Server Behaviors: Behavi or (the function is most, the most powerful place)
Components: In Asp, this face plate is not need
I think everybody sees these things very kind. Choose Database label, see not, helpful still, tell your use measure, to the novice, can the edge does an edge to learn. Pretty good, very pretty good.
Graph Qy-2
Still having a very important place is tool column, the thing is very much, nevertheless we basically are to tell backstage supporter, what concern with us basically is ASP label and Application label (the Qy-3 that be like a graph)
Graph Qy-3
Good, what tell today is abecedarian understanding, let everybody have an idea, because the thing of MX conformity is too much, the function is too powerful, let abecedarian have bit of way first. We will meet those who tell MX backstage side apply henceforth, basically be combinative Asp+Access. Want everybody to look slowly only, can use MX to establish a dynamic individual websit e certainly.
In Dreamweaver how to use pattern plate
What charm does that pattern plate have? What kind of characteristic does it have again?
Use pattern plate, we are OK solidify site the element that every page appears.
Found WEB page through using pattern plate, can make whole site has unified color.
Want to revise pattern plate only, can revise all WEB page that used this pattern plate, and do not need a hand to move revise each page. When for instance need changes your copyright, do you want one page of one page undertake copyright is revised? If there are on 1000 pages? I believe you are met one build 3 two big. But if you used pattern plate, these do not become an issue.
A more comprehensive example is below, the can rapid use that lets you master pattern plate.
1.Editor page
Open DW, build a site, we with respect to entitle " cobweb " .
Build a blank page to regard as inside page (normally a website has a home page only, be opposite so home page we need not make it pattern plate) , entitle Body.htm.
Edit this page, if pursue,finish 1.
Graph 1, edit the Body.htm page after finishing, notice A is in, will serve as here can edit area, later development can is aimed at allude.
2.Make pattern plate
After the editor is finished, we save this page for pattern plate (the attention is not to save for common Htm webpage) . Through DW medium File à Save As Template can be put for pattern plate, the meeting after executing this order plays a window of Save As Template, if pursue 2.
Graph 2, window of Save As Template.
Graph 2 medium B place are choice site, we choose " cobweb " , c place should put name of bed pattern plate file for us, we fill B ody. The Save that presses top right corner is saved.
At this moment we press F8 v Site (site management implement) , body.dwt can see in Templates folder (when should having pattern plate file, DW can generate Templates folder automatically, dwt is file of pattern plate type)
3.Editor pattern plate
File of Body.dwt pattern plate is opened in Site, will discover with Body.htm the page is like it doesn't matter to part, but it is different actually, be to cannot add what can edit area in Body.htm. Can edit area to be able to be added in pattern plate file only.
Better to allow authority understanding " can edit area " , we make file of a Htm with this pattern plate first: Nod File à New From Template, play a Select Template window, body chooses in Emplates, the Select that clicks top right corner again can make a new Htm file. We build this the page incognito for Body2.htm. We use DW now Body.htm and Body2.htm two files are opened, compar e what differs. Your meeting discovery is being written in the top right corner of Body2.htm page " Template:bOdy " a few words. (showing this page is by Body.dwt pattern plate the file is generated) your can open-eyed at the same time discovery Body2.htm file can not edit actually (Body.htm can edit) . Was opposite, because the definition is done not have in file of Body.dwt pattern plate,this is " can edit area " result, make generated page cannot edit. So we must be added in pattern plate file can edit area. It is to add the measure that can edit area below:
1) open file of Body.dwt pattern plate, we hope the form among can edit (pursue namely 1 medium A is in) . But should be in Body.dwt file, is not Body.htm) , want herein to add so can edit area.
2) put mouse cursor A to be in in form, click mouse right key, choose New Editable Region... , play a window of New Editable Region, the name that asks to fill this to be able to edit area (we are called normal ly can edit area to label) . We fill Region01, click Ok to shut this window to finish the edition that can edit area to label currently. Can see right now the graph is like in form the indication of 3.
Graph 3, window of New Editable Region.
The specification has what a mark is Region01 to be able to edit area here.
Hereto we defined to be able to edit area, if many edit area, likewise OK do sth following a set pattern.
※ still can pass New Editable Region of à of Modify à Templates... generate new can edit area, if want to delete,can edit area, can pass Remove Editable Region of à of Modify à Templates... , operate by clew next can.
4.Make a page with pattern plate
Also had alluded to make the move of the page with pattern plate before us actually, pass File à New From Template namely. Consult please the concerned measure of the 3rd pace. We make a page that the name is Body3.htm with pattern plate now. At this moment you can discover, in Body3.htm page besides can edit area Region01, other place mouse became limitative state. We can add the content that we need in edition section here, for instance we write an article casually. Can need according to ours so, use pattern plate to make a page.
5.Content of modification pattern plate and newer site file
Open file of Body.dwt pattern plate, the place that us need revises undertakes modification, for instance we change Logo picture or He Fei of long change to another post can edit area, be added even or delete can edit area to wait.
Those who change Logo to explain pattern plate is how to replace a document is use below.
We change Logo picture into the picture that additionally we like, body.dwt file is saved after finishing, at this moment DW can play a window inquiry to whether need to replace a document, choose Update, DW is met automatic update all pages that make with this pattern plate, the DW when updating can play an Update Pages window, after finishing, can give out in Update Pages window newer daily record.
If ※ chose Don ' T Update, DW holds pattern plate file directly, do not update a page temporarily, but we are OK the hand uses newer page, should choose Update Pages of à of Modify à Templates only... can.
At this moment we open the page that random makes with Body.dwt, be like Body3.htm. Can discover Logo picture has been changed.
Discover not hard, use this function, our OK and relaxed settlement the site replaces an issue, the function of pattern plate is very powerful, this article has the effect of cast a brick to attract jade-offer a few commonplace remarks by way of introduction so that others may come up with valuable opinions only, a lot of functions fail to allude as a result of length problem, oneself want much trial and error, such ability appreciate the pattern plate elegant demeanour of DW adequately.
In DW, still have a function that calls a library, follow pattern plate to be able to cooperate organicly, such meetings make the function of pattern plate more powerful, if reader response has fun at, I am willing to be displayed for everybody on this one gift.
A few kinds of methods of background music are inserted in Dreamweaver
A few kinds of methods of background music are inserted in Dreamweaver
Receive the letter of the netizen that likes college of Pacific Ocean network for many times, if why the query in the letter inserts background music in Dreamweaver, make me one-time insert a method to what everybody introduces a few kinds of background music now, let more people master it.
One, direct insertion
1. Open a piece of need to insert the webpage of background music, such command finds in menu: Windows ->Behaviors, v " Behaviors " behavior face plate, following plan institute show (the face plate) of Dreamweaver MX:
2. Click " + " date pushbutton, choose " Play Sound " command, pursue as follows:
If this command is shown,turn over white, not usable, in list is being drawn below the command here please, choose " Show Even For " command, here child choose in menu " IE 4.0 " the version of above, because the version of IE 4.0 above just supports the music of this kind of format,insert a method.
3. Play right now piece insert file window, by " Browser " pushbutton chooses musical file, it is the musical file form that wants browser support of course (be like Mid, Wav, AIFF, AU)
4. After inserting, the meeting in the webpage shows " Plugin " plug-in unit icon, but we still need farther adjustment. Because Dreamweaver inserted code of a paragraph of control automatically, convenient we are custom-built activation background music. But this function does not need to be used, so be about to delete it. Code has two paragraphs, be as follows respectively:
Code one,
Code 2,
5. Finish insert, right now background music still cannot be broadcasted automatically, the dot chooses plug-in unit icon, press " Ctrl + F3 " shortcut key, v attribute face plate, click right of next horn " Parameters " pushbutton, undertake modification in playing the win dow that give, parameter " AutoStart " from the back " Value " default is worth " False " change " True " (following plan institute are shown) , achieve the result that opens page background music to ring so.
We know, of music broadcasting have time accident, if hope it repeats,broadcast, can on in the graph " Loop " parameter value changes " True " .
A few kinds of methods of background music are inserted in Dreamweaver
Receive the letter of the netizen that likes college of Pacific Ocean network for many times, if why the query in the letter inserts background music in Dreamweaver, make me one-time insert a method to what everybody introduces a few kinds of background music now, let more people master it.
6. Open before when deleting code, we saw the HTML mark that inserts music is<EMBED>, to make everybody right it has more thorough knowledge, cite next - of institute of network of a paragraph of Pacific Ocean>Design classroom ->In HTML part " HTML language is analysed " one medium paragraph, introduce<The parameter that EMBED > labels:
| <EMBED>It is to be used insert all sorts of multimedia, the format can be Midi, Wav, AIFF, AU is waited a moment, the IE of Netscape and new edition supports. Its parameter set is more. Following <EMBED Src="your.mid" Autostart="true" Loop="true" Hidden="true ">Src="your.mid " |
2, code law
| <BGSOUND > : <BGSOUND>It is to be used insert background music, but apply to IE only, its parameter set is not much. Following <BGSOUND Src="your.mid" Autostart=true Loop=infinite> Src="your.mid " |
This kind of method is direct<BGSOUND > mark is put at webpage file<Head ></ between Head > , the way that sets good Mid file goes. The setting of parameter is like the explanation in article.
3, plug-in unit law
Some people did not abandon FrontPage from beginning to end perhaps because be in of a few elements in inserting, dreamweaver did not provide a function, no-go perhaps. But we know, dreamweaver supports plug-in unit, sound inserted plug-in unit to be offerred for us convenient.
Plug- in unit downloads: Sound.mxp
Download hind doubleclicks a file, OK and direct installation, installation is finished you can be in " object " of face plate " Common " column sees icon of a horn. Click this pushbutton directly, play those who give following plan institute to show to insert the window:
Forever: The setting is broadcasted indefinitely circularly
Never: Do not broadcast circularly, broadcast only namely
NO Of Times: Set the number that broadcast
Click " Browser " after pushbutton chooses nice voice file, by finish certainly make.
Learned above 3 kinds of methods, insert background music to go to the lavatory simply later much.
