For every customer, I have the

For every customer, I have the "cus

For every customer, I have the "customer_id", which is a string of 5-7 characters.

When creating the document, I need to dynamically insert a special PDF for each customer.

The name of the PDF is a fixed Path (e.g. "C:/pdf/") plus the customer number formatted as a 8-digit value, padded with "0"s.

Example: customer number "12345" leads the the PDF "C:/pdf/00012345.pdf" - thus this path needs to be set as the "src"-attribute of an image (I guess...)

There are two "challenges":

1) how do I format the number?

I tried to a JavaScript - file that implements a "sprintf" and "vsprintf"-function, but I can not call then; they are unknown. Next try was something like substr() - as there was no change for the image, I can not tell if that one worked as expected.

2) how do I set the attribute?

I tried with a fixed full path (to see if that would work), but no change for the image.

results.attr('src', "C:/pdf/00012345.pdf")

So: how can I generate the correct name for the PDF and apply this name to the image?

Is there any support for debugging the JavaScript-code? Unfortunately, I even didn't manage to display a simple alert() to see the values of my varaibles.

0/5000
จาก: -
เป็น: -
ผลลัพธ์ (ไทย) 1: [สำเนา]
คัดลอก!
For every customer, I have the "customer_id", which is a string of 5-7 characters.When creating the document, I need to dynamically insert a special PDF for each customer.The name of the PDF is a fixed Path (e.g. "C:/pdf/") plus the customer number formatted as a 8-digit value, padded with "0"s.Example: customer number "12345" leads the the PDF "C:/pdf/00012345.pdf" - thus this path needs to be set as the "src"-attribute of an image (I guess...)There are two "challenges":1) how do I format the number?I tried to a JavaScript - file that implements a "sprintf" and "vsprintf"-function, but I can not call then; they are unknown. Next try was something like substr() - as there was no change for the image, I can not tell if that one worked as expected.2) how do I set the attribute?I tried with a fixed full path (to see if that would work), but no change for the image. results.attr('src', "C:/pdf/00012345.pdf")So: how can I generate the correct name for the PDF and apply this name to the image?Is there any support for debugging the JavaScript-code? Unfortunately, I even didn't manage to display a simple alert() to see the values of my varaibles.
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 2:[สำเนา]
คัดลอก!
สำหรับลูกค้าทุกคนผมมี "CUSTOMER_ID" ซึ่งเป็นสตริง 5-7 ตัวอักษร. เมื่อมีการสร้างเอกสารที่ฉันต้องใส่แบบไดนามิกรูปแบบไฟล์ PDF พิเศษสำหรับลูกค้าแต่ละราย. ชื่อของไฟล์ PDF เป็นเส้นทางคงที่ (เช่น " C: / pdf / ") บวกกับจำนวนลูกค้าที่จัดรูปแบบเป็นค่า 8 หลัก, เบาะด้วย" 0 "s.: 12345" นำไปสู่รูปแบบไฟล์ PDF "C ตัวอย่างลูกค้าจำนวน": /pdf/00012345.pdf "- ดังนั้นนี้ เส้นทางที่จะต้องมีการตั้งค่าเป็น "src" -attribute ของภาพ (ฉันเดา ... ) มีสอง "ความท้าทาย": 1) ฉันจะจัดรูปแบบตัวเลขหรือไม่ฉันพยายามที่จะJavaScript - แฟ้มที่นำไปปฏิบัติ "sprintf "และ" vsprintf "ฟังก์ชั่ แต่ฉันไม่สามารถเรียกแล้ว; พวกเขาเป็นที่รู้จัก ลองต่อไปคือสิ่งที่ต้องการ substr () -. ขณะที่มีการเปลี่ยนแปลงภาพที่ไม่มีฉันไม่สามารถบอกได้ว่าว่าทำงานตามที่คาดไว้2) วิธีการทำผมตั้งแอตทริบิวต์ฉันพยายามกับเส้นทางแบบเต็มคงที่(เพื่อดูว่า จะทำงาน) แต่การเปลี่ยนแปลงภาพ no. results.attr (src '"C: /pdf/00012345.pdf") ดังนั้น: วิธีการที่ฉันสามารถสร้างชื่อที่ถูกต้องสำหรับรูปแบบไฟล์ PDF และใช้ชื่อนี้ในภาพหรือไม่มีการสนับสนุนใด ๆ สำหรับการแก้จุดบกพร่องจาวาสคริปต์รหัส? แต่น่าเสียดายที่ผมยังไม่ได้จัดการแสดงการแจ้งเตือนง่าย () เพื่อดูค่า varaibles ของฉัน























การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 3:[สำเนา]
คัดลอก!
สำหรับลูกค้าทุกท่าน ผมมี " customer_id " ซึ่งเป็นสาย 5-7 ตัวละคร

เมื่อมีการสร้างเอกสาร ฉันต้องไดนามิกแทรก PDF พิเศษสำหรับลูกค้าแต่ละราย

ชื่อของไฟล์เป็นเส้นทางที่คงที่ ( เช่น " C : / PDF / " ) บวกกับลูกค้าหมายเลขการจัดรูปแบบเป็น 8-digit ค่าเบาะด้วย " 0 " s .

ตัวอย่าง : หมายเลขลูกค้า " 12345 " นำ PDF " C : / PDF / 00012345 .รูปแบบไฟล์ PDF - ดังนั้น เส้นทางนี้ต้องถูกตั้งค่าเป็น " ต้นทาง " -- คุณลักษณะของภาพ ( ผมเดาว่า . . . . . . . )

มี 2 " ท้าทาย " :

1 ) อย่างไรฉันจัดรูปแบบตัวเลข

ฉันพยายามที่จะเปิดแฟ้มที่ใช้ - " sprintf " และ " vsprintf " ฟังก์ชัน แต่ผมจะไม่เรียกแล้ว เขาจะไม่รู้จัก ต่อไปลองเป็นสิ่งที่ต้องการ substr() - ไม่มีการเปลี่ยนแปลงสำหรับรูป ผมบอกไม่ได้ ถ้าคนหนึ่งทำงานตามที่คาดไว้

2 ) อย่างไรฉันตั้งค่าแอตทริบิวต์ ?

ผมลองกับเส้นทางแบบเต็ม ( คงเห็นว่าการที่จะทำงาน ) แต่ไม่มีการเปลี่ยนแปลงสำหรับภาพ

ผล attr ( 'src ' " C : / PDF / 00012345 . pdf " )

ดังนั้นฉันสามารถสร้างชื่อที่ถูกต้องสำหรับ PDF และใช้ชื่อนี้ ภาพ ?

มีการสนับสนุนสำหรับการแก้จุดบกพร่อง JavaScript รหัส ? ขออภัยฉันยังไม่ได้จัดการเพื่อแสดง alert() อย่างง่ายเพื่อดูค่า

varaibles ของฉัน
การแปล กรุณารอสักครู่..
 
ภาษาอื่น ๆ
การสนับสนุนเครื่องมือแปลภาษา: กรีก, กันนาดา, กาลิเชียน, คลิงออน, คอร์สิกา, คาซัค, คาตาลัน, คินยารวันดา, คีร์กิซ, คุชราต, จอร์เจีย, จีน, จีนดั้งเดิม, ชวา, ชิเชวา, ซามัว, ซีบัวโน, ซุนดา, ซูลู, ญี่ปุ่น, ดัตช์, ตรวจหาภาษา, ตุรกี, ทมิฬ, ทาจิก, ทาทาร์, นอร์เวย์, บอสเนีย, บัลแกเรีย, บาสก์, ปัญจาป, ฝรั่งเศส, พาชตู, ฟริเชียน, ฟินแลนด์, ฟิลิปปินส์, ภาษาอินโดนีเซี, มองโกเลีย, มัลทีส, มาซีโดเนีย, มาราฐี, มาลากาซี, มาลายาลัม, มาเลย์, ม้ง, ยิดดิช, ยูเครน, รัสเซีย, ละติน, ลักเซมเบิร์ก, ลัตเวีย, ลาว, ลิทัวเนีย, สวาฮิลี, สวีเดน, สิงหล, สินธี, สเปน, สโลวัก, สโลวีเนีย, อังกฤษ, อัมฮาริก, อาร์เซอร์ไบจัน, อาร์เมเนีย, อาหรับ, อิกโบ, อิตาลี, อุยกูร์, อุสเบกิสถาน, อูรดู, ฮังการี, ฮัวซา, ฮาวาย, ฮินดี, ฮีบรู, เกลิกสกอต, เกาหลี, เขมร, เคิร์ด, เช็ก, เซอร์เบียน, เซโซโท, เดนมาร์ก, เตลูกู, เติร์กเมน, เนปาล, เบงกอล, เบลารุส, เปอร์เซีย, เมารี, เมียนมา (พม่า), เยอรมัน, เวลส์, เวียดนาม, เอสเปอแรนโต, เอสโทเนีย, เฮติครีโอล, แอฟริกา, แอลเบเนีย, โคซา, โครเอเชีย, โชนา, โซมาลี, โปรตุเกส, โปแลนด์, โยรูบา, โรมาเนีย, โอเดีย (โอริยา), ไทย, ไอซ์แลนด์, ไอร์แลนด์, การแปลภาษา.

Copyright ©2026 I Love Translation. All reserved.

E-mail: